Function at 0x4065e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x22c
push ebx
push ebp
push esi
mov ebx, eax
push edi
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x248]
mov edi, ecx
mov esi, edx
xor ebp, ebp
call fcn.00406130
test eax, eax
je 0x40688a
lea ecx, [esp + 0x10]
push ecx
push 0x409700
push 2
call fcn.00401b30
mov ebp, eax
test ebp, ebp
je 0x406785
push 0x200
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
lea edx, [esp + 0x44]
push edx
call fcn.00401a00
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ax, word [esp + 0x34]
mov cx, word [esp + 0x30]
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x5c], esi
mov word [esp + 0x58], ax
mov word [esp + 0x5a], cx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0
push 0x10
lea eax, [esp + 0x1c]
push eax
call fcn.00401990
mov ecx, esi
neg ecx
sbb cl, cl
and cl, 0xf0
test esi, esi
setne dl
mov dword [esp + 0x63], eax
mov eax, dword [esp + 0x248]
mov byte [esp + 0x60], cl
lea edx, [edx*8 + 0xf0]
mov byte [esp + 0x51], dl
test eax, eax
je 0x4066ae
push 0xb
push eax
lea eax, [esp + 0x6f]
push eax
call fcn.00401a00
mov eax, edi
test ebx, ebx
jne 0x406704
shr eax, 0xb
cmp eax, 2
mov dword [esp + 0x10], eax
jge 0x4066c4
mov al, 1
jmp 0x4066ce
cmp eax, 4
setge al
lea eax, [eax + eax + 2]
movzx ecx, al
mov byte [esp + 0x49], al
xor edx, edx
mov eax, edi
div ecx
mov edx, 0xe0
mov word [esp + 0x4f], di
mov dword [esp + 0x5c], 0
mov word [esp + 0x4d], dx
mov byte [esp + 0x76], 0x32
lea eax, [eax + eax*2 + 1]
shr eax, 1
add eax, 0x1ff
jmp 0x406736
mov ecx, 1
shr eax, 0x10
cmp eax, ecx
jle 0x406716
add ecx, ecx
cmp ecx, eax
jl 0x406710
push ecx
push 4
call fcn.004013a0
movzx ecx, al
mov byte [esp + 0x49], al
mov eax, edi
xor edx, edx
div ecx
mov dword [esp + 0x5c], edi
lea eax, [eax + eax + 0x1fe]
movzx ebp, word [esp + 0x4d]
shr eax, 9
mov word [esp + 0x52], ax
movzx eax, ax
add eax, eax
mov edx, eax
mov eax, edi
sub eax, edx
movzx edx, word [esp + 0x4a]
add ebp, 0xf
sub eax, edx
shl ebp, 5
sar ebp, 9
sub eax, ebp
xor edx, edx
div ecx
add eax, 2
test ebx, ebx
jne 0x406794
cmp eax, 0xff6
jl 0x4067ca
mov eax, dword [esp + 0x240]
push ebx
push str.FAT128
push eax
call fcn.00401c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x22c
ret 0xc
cmp ebx, 1
jne 0x4067ca
cmp eax, 0xff6
jl 0x4067a7
cmp eax, 0xfff6
jl 0x4067ca
mov ecx, dword [esp + 0x240]
push 0
push str.FAT168
push ecx
call fcn.00401c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x22c
ret 0xc
mov eax, dword [esp + 0x244]
push 1
lea edx, [esp + 0x40]
push edx
push esi
push eax
call fcn.004061b0
movzx edi, word [esp + 0x52]
push 0x200
lea ecx, [esp + 0x40]
push ecx
inc esi
dec edi
call fcn.00401a50
neg ebx
sbb ebx, ebx
push 1
and ebx, 0xff000008
lea edx, [esp + 0x40]
add ebx, 0xfffff0
push edx
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x24c]
push esi
push ebx
call fcn.004061b0
inc esi
push esi
mov eax, edi
mov ecx, ebx
call fcn.00406470
push 1
lea eax, [esp + 0x40]
push eax
add esi, edi
push esi
push ebx
call fcn.004061b0
inc esi
push esi
mov eax, edi
mov ecx, ebx
call fcn.00406470
mov eax, dword [esp + 0x248]
add esi, edi
test eax, eax
je 0x40686e
push 0x20
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401a00
push 1
lea edx, [esp + 0x40]
push edx
push esi
push ebx
call fcn.004061b0
inc esi
dec ebp
push esi
mov eax, ebp
mov ecx, ebx
call fcn.00406470
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x22c
ret 0xc
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x22c
ret 0xc