Function at 0x40d870
Capabilities:
Create directory
Extract resource via kernel32 functions
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534a37
mov eax, dword fs:[0]
push eax
mov eax, 0xcb30
call fcn.0051c1e0
mov eax, dword [0x595834]
xor eax, ebp
mov dword [ebp - 0x18], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
push 0x598f34
mov ecx, 0x599220
call fcn.0040a5d0
push 0x54bff8
mov eax, dword [ebp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
push 0x599220
lea edx, [ebp + 8]
push edx
lea eax, [ebp - 0xca70]
push eax
call fcn.0040a2f0
add esp, 0xc
mov dword [ebp - 0xcb00], eax
mov ecx, dword [ebp - 0xcb00]
mov dword [ebp - 0xca94], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0xca94]
mov eax, dword [edx]
mov dword [ebp - 0xca98], eax
push 0
mov ecx, dword [ebp - 0xca98]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [ebp - 4], 2
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xca70]
call fcn.0041b810
push 0x599220
lea edx, [ebp + 8]
push edx
lea eax, [ebp - 0xca74]
push eax
call fcn.0040a2f0
add esp, 0xc
mov dword [ebp - 0xcb04], eax
mov ecx, dword [ebp - 0xcb04]
mov dword [ebp - 0xcaa0], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0xcaa0]
mov eax, dword [edx]
mov dword [ebp - 0xcaa4], eax
mov ecx, dword [ebp - 0xcaa4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov byte [ebp - 4], 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xca74]
call fcn.0041b810
mov edx, dword [ebp - 0x10]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xca48], eax
push 0
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xca48]
push ecx
lea edx, [ebp - 0xca4c]
push edx
call fcn.00404390
mov dword [ebp - 0x244], 0xffffffff
lea eax, [ebp - 0x244]
push eax
mov ecx, dword [ebp - 0xca4c]
push ecx
call fcn.00403ed0
mov edx, dword [ebp - 0x244]
mov dword [ebp - 0xca50], edx
mov dword [ebp - 0x244], 0
jmp 0x40da01
mov eax, dword [ebp - 0x244]
add eax, 1
mov dword [ebp - 0x244], eax
mov ecx, dword [ebp - 0x244]
cmp ecx, dword [ebp - 0xca50]
jae 0x40dc29
lea edx, [ebp - 0x244]
push edx
mov eax, dword [ebp - 0xca4c]
push eax
call fcn.00403ed0
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0xca5c]
call fcn.00401c80
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0xca5c]
mov dword [ebp - 0xcab8], edx
push 0x5c
mov eax, dword [ebp - 0xcab8]
push eax
call fcn.0051c1c4
add esp, 8
mov dword [ebp - 0xcab4], eax
cmp dword [ebp - 0xcab4], 0
jne 0x40da74
mov dword [ebp - 0xcb08], 0xffffffff
jmp 0x40da86
mov ecx, dword [ebp - 0xcab4]
sub ecx, dword [ebp - 0xca5c]
mov dword [ebp - 0xcb08], ecx
mov edx, dword [ebp - 0xcb08]
mov dword [ebp - 0xca54], edx
cmp dword [ebp - 0xca54], 0xffffffff
je 0x40daf2
mov eax, dword [ebp - 0xca54]
add eax, 1
push eax
lea ecx, [ebp - 0xca78]
push ecx
lea ecx, [ebp - 0xca5c]
call fcn.00411490
mov dword [ebp - 0xcb0c], eax
mov edx, dword [ebp - 0xcb0c]
mov dword [ebp - 0xcabc], edx
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0xcabc]
push eax
lea ecx, [ebp - 0xca5c]
call fcn.0040a5d0
mov byte [ebp - 4], 7
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xca78]
call fcn.0041b810
push 0x599220
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0xca7c]
push edx
call fcn.0040a2f0
add esp, 0xc
mov dword [ebp - 0xcb10], eax
mov eax, dword [ebp - 0xcb10]
mov dword [ebp - 0xcb14], eax
mov byte [ebp - 4], 8
push 0x54bc58
mov ecx, dword [ebp - 0xcb14]
push ecx
lea edx, [ebp - 0xca80]
push edx
call fcn.00411600
add esp, 0xc
mov dword [ebp - 0xcb18], eax
mov eax, dword [ebp - 0xcb18]
mov dword [ebp - 0xcb1c], eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xca5c]
push ecx
mov edx, dword [ebp - 0xcb1c]
push edx
lea eax, [ebp - 0xca58]
push eax
call fcn.0040a2f0
add esp, 0xc
mov byte [ebp - 4], 0xc
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xca80]
call fcn.0041b810
mov byte [ebp - 4], 0xe
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0xca7c]
call fcn.0041b810
lea ecx, [ebp - 0x244]
push ecx
mov edx, dword [ebp - 0xca58]
push edx
mov eax, dword [ebp - 0xca4c]
push eax
call fcn.00405b50
cmp dword [0x598f30], 0
je 0x40dbfe
mov ecx, dword [0x591178]
mov dword [ebp - 0xcad0], ecx
mov edx, dword [0x591178]
add edx, 1
mov dword [0x591178], edx
mov eax, dword [0x598f30]
add eax, 0x74
mov dword [ebp - 0xcacc], eax
push 0
mov ecx, dword [ebp - 0xcad0]
push ecx
push 0x402
mov edx, dword [ebp - 0xcacc]
mov eax, dword [edx + 0x20]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov byte [ebp - 4], 0xf
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xca58]
call fcn.0041b810
mov byte [ebp - 4], 0x10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xca5c]
call fcn.0041b810
jmp 0x40d9f2
mov ecx, dword [ebp - 0xca4c]
push ecx
call fcn.00403ea0
mov edx, dword [ebp - 0xca48]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 0x599220
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0xca84]
push ecx
call fcn.0040a2f0
add esp, 0xc
mov dword [ebp - 0xcb20], eax
mov edx, dword [ebp - 0xcb20]
mov dword [ebp - 0xcb24], edx
mov byte [ebp - 4], 0x11
push str._skin
mov eax, dword [ebp - 0xcb24]
push eax
lea ecx, [ebp - 0xca88]
push ecx
call fcn.00411600
add esp, 0xc
mov dword [ebp - 0xcb28], eax
mov edx, dword [ebp - 0xcb28]
mov dword [ebp - 0xcadc], edx
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0xcadc]
mov ecx, dword [eax]
mov dword [ebp - 0xcae0], ecx
push 0
mov edx, dword [ebp - 0xcae0]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [ebp - 4], 0x13
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0xca88]
call fcn.0041b810
mov byte [ebp - 4], 0x14
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xca84]
call fcn.0041b810
mov dword [ebp - 0xca60], 0
jmp 0x40dcff
mov eax, dword [ebp - 0xca60]
add eax, 1
mov dword [ebp - 0xca60], eax
cmp dword [ebp - 0xca60], 2
jge 0x40debf
push 0x54bff8
mov ecx, dword [ebp - 0xca60]
add ecx, 0x83
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
push 0xc800
push 0
lea eax, [ebp - 0xca44]
push eax
call fcn.0051ab50
add esp, 0xc
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x10]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
lea eax, [ebp - 0xca44]
push eax
call fcn.0051a400
add esp, 0xc
cmp dword [ebp - 0xca60], 0
je 0x40dd83
mov dword [ebp - 0xcb2c], str.status_red.bmp
jmp 0x40dd8d
mov dword [ebp - 0xcb2c], str.status_green.bmp
push 0x599220
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0xca8c]
push edx
call fcn.0040a2f0
add esp, 0xc
mov dword [ebp - 0xcb30], eax
mov eax, dword [ebp - 0xcb30]
mov dword [ebp - 0xcb34], eax
mov byte [ebp - 4], 0x15
push str._skin_
mov ecx, dword [ebp - 0xcb34]
push ecx
lea edx, [ebp - 0xca90]
push edx
call fcn.00411600
add esp, 0xc
mov dword [ebp - 0xcb38], eax
mov eax, dword [ebp - 0xcb38]
mov dword [ebp - 0xcb3c], eax
mov byte [ebp - 4], 0x16
mov ecx, dword [ebp - 0xcb2c]
push ecx
mov edx, dword [ebp - 0xcb3c]
push edx
lea eax, [ebp - 0xca64]
push eax
call fcn.00411600
add esp, 0xc
mov byte [ebp - 4], 0x19
mov byte [ebp - 4], 0x18
lea ecx, [ebp - 0xca90]
call fcn.0041b810
mov byte [ebp - 4], 0x1b
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0xca8c]
call fcn.0041b810
mov ecx, dword [ebp - 0xca64]
mov dword [ebp - 0xcaf4], ecx
push 0
push 0
push 4
push 0
push 0
push 0x40000000
mov edx, dword [ebp - 0xcaf4]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xca68], eax
cmp dword [ebp - 0xca68], 0xffffffff
je 0x40dea7
push 0
push 0
push 0
mov eax, dword [ebp - 0xca68]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0xca6c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
lea eax, [ebp - 0xca44]
push eax
mov ecx, dword [ebp - 0xca68]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0xca68]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0x1c
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xca64]
call fcn.0041b810
jmp 0x40dcf0
mov dword [ebp - 4], 0x1d
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0041b810
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0051a243
mov esp, ebp
pop ebp
ret