Function at 0x4049b0
Capabilities:
Extract resource via kernel32 functions
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x4302ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x18], 0
jne 0x404a46
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x4288c0
push 0x12e
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x404bb5
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x404bb5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x404bb5
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push edi
call fcn.0041981a
mov ebx, eax
mov eax, dword [ebp - 0x1c]
push edi
push eax
push ebx
call fcn.00418d00
add esp, 0x10
jmp 0x404abb
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x404bb5
mov ecx, dword [esi + 0x14]
push ecx
call fcn.00402530
mov edx, dword [esi + 0x84]
push edx
mov dword [ebp - 0x1c], eax
call fcn.00402530
add esp, 8
push 0
push 0
add eax, 0x2c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0041981a
mov edx, dword [ebp - 0x1c]
add esp, 4
push 0
lea ecx, [ebp - 0x1c]
push ecx
push edx
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x404bb5
mov eax, dword [0x432304]
mov edx, dword [eax + 0xc]
mov ecx, 0x432304
call edx
mov ecx, dword [esi + 0x7c]
add eax, 0x10
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x80]
push eax
push ecx
lea edx, [ebp - 0x20]
push str._cn__d_cxy__dhzr
push edx
call fcn.00403b00
push 0x10
lea eax, [esi + 0x6c]
push eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.00403c60
mov eax, dword [eax]
mov edx, dword [eax - 0xc]
add esp, 0x1c
push edx
push eax
lea ecx, [ebp - 0x20]
call fcn.00404170
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b31
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0x14]
push ecx
call fcn.00402530
mov edi, eax
push edi
call fcn.0041981a
mov edx, dword [ebp - 0x20]
push eax
push edx
push edi
push ebx
mov dword [esi + 0xa4], eax
call fcn.004027d0
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0xa4]
lea eax, [ebp - 0x14]
push eax
push ecx
push edx
call fcn.004024f0
add esp, 0x24
mov dword [ebp - 0x18], 1
xor eax, eax
mov cl, byte [ebp + eax - 0x14]
cmp cl, byte [esi + eax + 0x1c]
jne 0x404b86
inc eax
cmp eax, 0x10
jb 0x404b74
jmp 0x404b8d
mov dword [ebp - 0x18], 0
push ebx
call fcn.0041980f
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404bb5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
pop edi
pop esi
pop ebx
test edx, edx
jg 0x404bd7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00418c6f
mov esp, ebp
pop ebp
ret 4