Function at 0x413620
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
sub esp, 0x240
mov eax, dword [0x42f114]
xor eax, esp
mov dword [esp + 0x23c], eax
push edi
mov edi, dword [esp + 0x248]
push edi
call fcn.004135a0
test eax, eax
jl 0x413a2a
imul eax, eax, 0x53c
push ebx
mov ebx, dword [eax + ecx + 0x34c]
push ebp
mov ebp, dword [eax + ecx + 0x358]
push esi
lea esi, [eax + ecx]
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x41382d
cmp dword [esi + 0x884], 0
jne 0x4136f5
movzx eax, bp
push 0x17
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4136f5
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4136f5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push ebx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
push ebp
call fcn.00414f91
mov ecx, dword [esp + 0x14]
push ebp
mov edi, eax
push ecx
push edi
call fcn.00415b70
add esp, 0x10
mov dword [esi + 0x360], ebp
mov dword [esi + 0x364], edi
cmp byte [edi], 0xfd
jbe 0x4136e7
cmp byte [edi + 1], 0xfd
jbe 0x4136e7
mov dword [esi + 0x35c], 1
jmp 0x4136f1
mov dword [esi + 0x35c], 0
mov ebp, dword [esp + 0x14]
cmp dword [esi + 0x884], 1
jne 0x413a27
movzx edx, bp
push 0xa
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x413a27
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x413a27
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push ebx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
push eax
push ebp
call fcn.00408910
push 0x103
mov edi, eax
lea eax, [esp + 0x159]
push 0
push eax
mov byte [esp + 0x160], 0
call fcn.00415440
mov ecx, dword [esp + 0x26c]
push ecx
lea edx, [esp + 0x164]
push str._04x.txt
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x38]
push ecx
push 1
lea edx, [esp + 0x178]
push edx
push edi
call fcn.00406380
add esp, 0x38
test eax, eax
jne 0x413a27
mov eax, dword [esp + 0x144]
push eax
call fcn.00414f91
mov ecx, dword [esp + 0x148]
mov edx, dword [esp + 0x14]
push ecx
mov ebp, eax
push ebp
push edx
push edi
call fcn.004089c0
mov eax, dword [esp + 0x158]
push eax
call fcn.00414f91
mov ecx, dword [esp + 0x15c]
push ecx
mov ebx, eax
push ebp
push ebx
call fcn.00415b70
push ebp
call fcn.00414f1c
push edi
call fcn.004089e0
mov edx, dword [esp + 0x170]
add esp, 0x2c
mov dword [esi + 0x360], edx
mov dword [esi + 0x364], ebx
cmp byte [ebx], 0xfd
jbe 0x41381e
cmp byte [ebx + 1], 0xfd
jbe 0x41381e
mov dword [esi + 0x35c], 1
jmp 0x413a27
mov dword [esi + 0x35c], 0
jmp 0x413a27
cmp dword [esi + 0x884], 1
jne 0x41393b
lea eax, [esi + 0x67c]
push 0
push eax
call fcn.004088f0
push 0x103
lea ecx, [esp + 0x155]
push 0
push ecx
mov ebp, eax
mov byte [esp + 0x15c], 0
call fcn.00415440
push edi
lea edx, [esp + 0x160]
push str._04x.txt
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x168]
push eax
push str.tszLang__s_n
call fcn.0040d550
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x3c]
push edx
push 1
lea eax, [esp + 0x17c]
push eax
push ebp
call fcn.00406380
add esp, 0x3c
test eax, eax
jne 0x41393b
mov ecx, dword [esp + 0x144]
push ecx
call fcn.00414f91
mov edx, dword [esp + 0x148]
push edx
mov ebx, eax
mov eax, dword [esp + 0x18]
push ebx
push eax
push ebp
call fcn.004089c0
mov ecx, dword [esp + 0x158]
add ecx, 4
push ecx
call fcn.00414f91
mov edx, dword [esp + 0x15c]
add edx, 4
push edx
mov edi, eax
push ebx
push edi
call fcn.00415b70
push ebx
call fcn.00414f1c
push ebp
call fcn.004089e0
mov eax, dword [esp + 0x170]
add esp, 0x2c
mov dword [esi + 0x364], edi
mov dword [esi + 0x360], eax
cmp byte [edi], 0xfd
jbe 0x413931
cmp byte [edi + 1], 0xfd
jbe 0x413931
mov dword [esi + 0x35c], 1
jmp 0x41393b
mov dword [esi + 0x35c], 0
cmp dword [esi + 0x884], 0
jne 0x413a27
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea ecx, [esi + 0x67c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x413a27
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea edi, [eax + 4]
push edi
mov dword [esp + 0x1c], eax
call fcn.00414f91
push edi
mov ebp, eax
call fcn.00414f91
push edi
push 0
push ebp
mov ebx, eax
call fcn.00415440
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
add esp, 0x14
push 0
lea edx, [esp + 0x18]
push edx
push eax
push ebp
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push ebp
push ebx
call fcn.00415b70
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jbe 0x413a02
mov dword [esi + 0x364], ebx
mov dword [esi + 0x360], eax
cmp byte [ebx], 0xfd
jbe 0x4139f6
cmp byte [ebx + 1], 0xfd
jbe 0x4139f6
mov dword [esi + 0x35c], 1
jmp 0x413a0f
mov dword [esi + 0x35c], 0
jmp 0x413a0f
test ebx, ebx
je 0x413a0f
push ebx
call fcn.00414f1c
add esp, 4
test ebp, ebp
je 0x413a1c
push ebp
call fcn.00414f1c
add esp, 4
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x240]
pop edi
xor ecx, esp
call fcn.004153dc
add esp, 0x240
ret 4