Function at 0x401370
Capabilities:
Delete file
Extract resource via kernel32 functions
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5236b1
mov eax, dword fs:[0]
push eax
sub esp, 0x624
mov eax, dword [0x56fe10]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, 1
push 0
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
movzx eax, word [ebp + 8]
push str.RES_DATA
push eax
push esi
mov dword [ebp - 0x630], 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x40149e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00405d41
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4013f7
push 0x80004005
call fcn.00401ef0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x62c], eax
push esi
lea ecx, [ebp - 0x62c]
push str.FindResource_fail_:__d
push ecx
mov byte [ebp - 4], 2
call fcn.00401920
mov esi, dword [ebp - 0x62c]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40144e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401471
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401497
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4017c3
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40157b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00405d41
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4014d0
push 0x80004005
call fcn.00401ef0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x62c], eax
push esi
lea ecx, [ebp - 0x62c]
push str.LoadResource_fail_:__d
push ecx
mov byte [ebp - 4], 3
call fcn.00401920
mov esi, dword [ebp - 0x62c]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401527
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40154a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401497
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4017c3
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x62c], eax
test eax, eax
jne 0x40165d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00405d41
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4015b2
push 0x80004005
call fcn.00401ef0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x62c], eax
push esi
lea ecx, [ebp - 0x62c]
push str.LockResource_fail_:__d
push ecx
mov byte [ebp - 4], 4
call fcn.00401920
mov esi, dword [ebp - 0x62c]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401609
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40162c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401497
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4017c3
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
xor ecx, ecx
push 0x40e
push ecx
lea edx, [ebp - 0x626]
push edx
mov edi, eax
mov word [ebp - 0x628], cx
call fcn.00502750
push 0x5777e0
push 0x5506a0
mov eax, 0x208
lea ebx, [ebp - 0x628]
call section..text
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x216]
push ecx
mov word [ebp - 0x218], ax
call fcn.00502750
mov edx, dword [ebp + 0x10]
push edx
mov eax, ebx
push eax
push str._s_s
lea edx, [ebp - 0x218]
call fcn.00401880
add esp, 0x2c
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea edx, [ebp - 0x218]
push edx
call ebx
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401773
lea ecx, [ebp - 0x218]
push ecx
call ebx
push str.CreateFile_fail
call ebx
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401745
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401497
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4017c3
mov edx, dword [ebp - 0x62c]
push 0
lea ecx, [ebp - 0x630]
push ecx
push edi
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4017aa
push str.WriteFile_fail
call ebx
lea ecx, [ebp + 0xc]
call fcn.004019a0
lea ecx, [ebp + 0x10]
call fcn.004019a0
xor al, al
jmp 0x4017c3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp + 0xc]
call fcn.004019a0
lea ecx, [ebp + 0x10]
call fcn.004019a0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050112e
mov esp, ebp
pop ebp
ret 0xc