Function at 0x40ffe3
Capabilities:
Extract resource via kernel32 functions
Get common file path
Set current directory
Write file on windows

Disassembly:
push ebp
sub esp, 0x104
lea ebp, [esp - 4]
mov eax, dword [0x5c4954]
xor eax, ebp
mov dword [ebp + 0x104], eax
push 0x1fc
mov eax, 0x55690e
call fcn.0052b327
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ecx
cmp dword [ecx + 4], ebx
je 0x41001e
mov al, 1
jmp 0x410892
mov dword [ebp - 0x64], ebx
call fcn.0048fb70
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x40]
push eax
call fcn.00440c36
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 4], ebx
call fcn.0040a390
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x5c]
push eax
mov byte [ebp - 4], 1
call fcn.0040f750
pop ecx
neg al
sbb al, al
pop ecx
xor esi, esi
push ebx
inc al
inc esi
push esi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 0x11], al
mov byte [ebp - 4], bl
call fcn.0040a290
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x40]
call fcn.00402d14
cmp byte [ebp - 0x11], bl
je 0x410086
xor al, al
jmp 0x410892
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x1c], 0x73
call fcn.00441013
pop ecx
cmp dword [eax + 0x18], 0x10
mov dword [ebp - 4], 2
jb 0x4100a9
mov eax, dword [eax + 4]
jmp 0x4100ac
add eax, 4
push eax
call fcn.0052b585
pop ecx
cmp eax, 0x16
push ebx
setge byte [ebp - 0x11]
or dword [ebp - 4], 0xffffffff
push esi
lea ecx, [ebp - 0x40]
call fcn.00402d14
mov dword [ebp - 0x24], ebx
call fcn.0048fb70
mov dword [ebp - 0x20], eax
push ebx
cmp byte [ebp - 0x11], bl
je 0x410247
mov edi, 0x571870
push edi
lea ecx, [ebp - 0x5c]
call fcn.0043b5e2
lea eax, [ebp - 0x80]
push eax
mov dword [ebp - 4], 3
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 4
call fcn.0040a390
lea ecx, [ebp - 0x5c]
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 5
call fcn.0040fe86
lea ecx, [ebp - 0x24]
push ecx
push eax
mov byte [ebp - 4], 6
call fcn.0040f750
add esp, 0x14
neg al
sbb al, al
push ebx
inc al
push esi
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x11], al
mov byte [ebp - 4], 5
call fcn.0040a290
push ebx
push esi
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 4
call fcn.0040a290
push ebx
push esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 3
call fcn.00402d14
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x5c]
call fcn.0040a290
cmp byte [ebp - 0x11], bl
jne 0x41007f
push ebx
push edi
lea ecx, [ebp - 0x5c]
call fcn.0043b5e2
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 4], 7
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 8
call fcn.0040a390
lea ecx, [ebp - 0x5c]
push ecx
push eax
lea eax, [ebp - 0x9c]
push eax
mov byte [ebp - 4], 9
call fcn.0040fe86
add esp, 0xc
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
mov byte [ebp - 4], 0xa
call fcn.0040e572
mov ecx, dword [ebp - 0x18]
push eax
mov byte [ebp - 4], 0xb
call fcn.0040f82f
neg al
sbb al, al
push ebx
inc al
push esi
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x11], al
mov byte [ebp - 4], 0xa
call fcn.00402d14
push ebx
push esi
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 9
call fcn.0040a290
push ebx
push esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 8
call fcn.0040a290
push ebx
push esi
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 7
call fcn.00402d14
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x5c]
call fcn.0040a290
cmp byte [ebp - 0x11], bl
jne 0x41007f
mov dword [ebp - 0x1c], 0x74
jmp 0x410733
push 0x571870
lea ecx, [ebp - 0x40]
call fcn.0043b5e2
lea eax, [ebp - 0xb8]
push eax
mov dword [ebp - 4], 0xc
mov dword [ebp - 0x10], esi
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0xf0]
mov dword [ebp - 4], 0xd
mov dword [ebp - 0x10], 3
call fcn.0040a390
lea ecx, [ebp - 0x40]
push ecx
push eax
lea eax, [ebp - 0x10c]
push eax
mov dword [ebp - 4], 0xe
mov dword [ebp - 0x10], 7
call fcn.0040fe86
push 0xf
pop ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.0040f750
add esp, 0x14
push 0x1a
pop edi
test al, al
je 0x410459
push ebx
push 0x571864
lea ecx, [ebp - 0x9c]
call fcn.0043b5e2
lea eax, [ebp - 0xd4]
push eax
mov dword [ebp - 4], 0x10
mov dword [ebp - 0x10], 0x1f
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x17c]
mov dword [ebp - 4], 0x11
mov dword [ebp - 0x10], 0x3f
call fcn.0040a390
lea ecx, [ebp - 0x9c]
push ecx
push eax
lea eax, [ebp - 0x208]
push eax
mov dword [ebp - 4], 0x12
mov dword [ebp - 0x10], 0x7f
call fcn.0040fe86
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [ebp - 4], 0x13
mov dword [ebp - 0x10], 0xff
call fcn.0040f750
add esp, 0x14
test al, al
je 0x410459
push ebx
push 0x571854
lea ecx, [ebp - 0x80]
call fcn.0043b5e2
lea eax, [ebp - 0x198]
push eax
mov dword [ebp - 4], 0x14
mov dword [ebp - 0x10], 0x1ff
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x160]
mov dword [ebp - 4], 0x15
mov dword [ebp - 0x10], 0x3ff
call fcn.0040a390
lea ecx, [ebp - 0x80]
push ecx
push eax
lea eax, [ebp - 0x1b4]
push eax
mov dword [ebp - 4], 0x16
mov dword [ebp - 0x10], 0x7ff
call fcn.0040fe86
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [ebp - 4], 0x17
mov dword [ebp - 0x10], 0xfff
call fcn.0040f750
add esp, 0x14
test al, al
je 0x410459
push ebx
push 0x571848
lea ecx, [ebp - 0x5c]
call fcn.0043b5e2
lea eax, [ebp - 0x1ec]
push eax
mov dword [ebp - 4], 0x18
mov dword [ebp - 0x10], 0x1fff
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x144]
mov dword [ebp - 4], 0x19
mov dword [ebp - 0x10], 0x3fff
call fcn.0040a390
lea ecx, [ebp - 0x5c]
push ecx
push eax
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], 0x7fff
call fcn.0040fe86
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [ebp - 4], 0x1b
mov dword [ebp - 0x10], 0xffff
call fcn.0040f750
add esp, 0x14
mov byte [ebp - 0x11], bl
test al, al
jne 0x41045d
mov byte [ebp - 0x11], 1
test dword [ebp - 0x10], 0x8000
mov dword [ebp - 4], edi
je 0x41047d
and dword [ebp - 0x10], 0xffff7fff
push ebx
push esi
lea ecx, [ebp - 0x128]
call fcn.0040a290
test dword [ebp - 0x10], 0x4000
mov dword [ebp - 4], 0x19
je 0x4104a1
and dword [ebp - 0x10], 0xffffbfff
push ebx
push esi
lea ecx, [ebp - 0x144]
call fcn.0040a290
test dword [ebp - 0x10], 0x2000
mov dword [ebp - 4], 0x18
je 0x4104c5
and dword [ebp - 0x10], 0xffffdfff
push ebx
push esi
lea ecx, [ebp - 0x1ec]
call fcn.00402d14
test dword [ebp - 0x10], 0x1000
mov dword [ebp - 4], 0x17
je 0x4104e6
and dword [ebp - 0x10], 0xffffefff
push ebx
push esi
lea ecx, [ebp - 0x5c]
call fcn.0040a290
test dword [ebp - 0x10], 0x800
mov dword [ebp - 4], 0x16
je 0x41050a
and dword [ebp - 0x10], 0xfffff7ff
push ebx
push esi
lea ecx, [ebp - 0x1b4]
call fcn.0040a290
test dword [ebp - 0x10], 0x400
mov dword [ebp - 4], 0x15
je 0x41052e
and dword [ebp - 0x10], 0xfffffbff
push ebx
push esi
lea ecx, [ebp - 0x160]
call fcn.0040a290
test dword [ebp - 0x10], 0x200
mov dword [ebp - 4], 0x14
je 0x410552
and dword [ebp - 0x10], 0xfffffdff
push ebx
push esi
lea ecx, [ebp - 0x198]
call fcn.00402d14
test dword [ebp - 0x10], 0x100
mov dword [ebp - 4], 0x13
je 0x410573
and dword [ebp - 0x10], 0xfffffeff
push ebx
push esi
lea ecx, [ebp - 0x80]
call fcn.0040a290
test byte [ebp - 0x10], 0x80
mov dword [ebp - 4], 0x12
je 0x410594
and dword [ebp - 0x10], 0xffffff7f
push ebx
push esi
lea ecx, [ebp - 0x208]
call fcn.0040a290
test byte [ebp - 0x10], 0x40
mov dword [ebp - 4], 0x11
je 0x4105b2
and dword [ebp - 0x10], 0xffffffbf
push ebx
push esi
lea ecx, [ebp - 0x17c]
call fcn.0040a290
test byte [ebp - 0x10], 0x20
mov dword [ebp - 4], 0x10
je 0x4105d0
and dword [ebp - 0x10], 0xffffffdf
push ebx
push esi
lea ecx, [ebp - 0xd4]
call fcn.00402d14
test byte [ebp - 0x10], 0x10
mov dword [ebp - 4], 0xf
je 0x4105ee
and dword [ebp - 0x10], 0xffffffef
push ebx
push esi
lea ecx, [ebp - 0x9c]
call fcn.0040a290
test byte [ebp - 0x10], 8
mov dword [ebp - 4], 0xe
je 0x41060c
and dword [ebp - 0x10], 0xfffffff7
push ebx
push esi
lea ecx, [ebp - 0x10c]
call fcn.0040a290
test byte [ebp - 0x10], 4
mov dword [ebp - 4], 0xd
je 0x41062a
and dword [ebp - 0x10], 0xfffffffb
push ebx
push esi
lea ecx, [ebp - 0xf0]
call fcn.0040a290
test byte [ebp - 0x10], 2
mov dword [ebp - 4], 0xc
je 0x410648
and dword [ebp - 0x10], 0xfffffffd
push ebx
push esi
lea ecx, [ebp - 0xb8]
call fcn.00402d14
or dword [ebp - 4], 0xffffffff
test byte [ebp - 0x10], 1
je 0x41065c
push ebx
push esi
lea ecx, [ebp - 0x40]
call fcn.0040a290
cmp byte [ebp - 0x11], bl
jne 0x41007f
push ebx
push 0x571864
lea ecx, [ebp - 0x40]
call fcn.0043b5e2
lea eax, [ebp - 0xd4]
push eax
mov dword [ebp - 4], 0x1c
call fcn.00440ee8
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x10c]
mov byte [ebp - 4], 0x1d
call fcn.0040a390
lea ecx, [ebp - 0x40]
push ecx
push eax
lea eax, [ebp - 0xf0]
push eax
mov byte [ebp - 4], 0x1e
call fcn.0040fe86
add esp, 0xc
lea ecx, [ebp - 0xb8]
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x1f
call fcn.0040e572
mov ecx, dword [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x20
call fcn.0040f82f
neg al
sbb al, al
push ebx
inc al
push esi
lea ecx, [ebp - 0xb8]
mov byte [ebp - 0x11], al
mov byte [ebp - 4], 0x1f
call fcn.00402d14
push ebx
push esi
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], 0x1e
call fcn.0040a290
push ebx
push esi
lea ecx, [ebp - 0x10c]
mov byte [ebp - 4], 0x1d
call fcn.0040a290
push ebx
push esi
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 0x1c
call fcn.00402d14
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0x40]
call fcn.0040a290
cmp byte [ebp - 0x11], bl
jne 0x41007f
push 0x57147c
push dword [ebp - 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, ebx
je 0x410887
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x410887
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x10], eax
cmp eax, ebx
jbe 0x410887
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x410887
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x20], 0x10
jb 0x410794
mov eax, dword [eax + 0xc]
jmp 0x410797
add eax, 0xc
push 0x571844
push eax
call fcn.0052c6a3
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x4107c0
push edi
push esi
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.0052c0fe
push edi
call fcn.0052c3b9
add esp, 0x14
mov edi, 0x104
push edi
lea eax, [ebp]
push ebx
push eax
call fcn.0052b590
add esp, 0xc
lea eax, [ebp]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp]
push eax
add ecx, 0x24
call fcn.00402cf3
lea eax, [ebp - 0xb8]
push eax
call fcn.00440ee8
pop ecx
cmp dword [eax + 0x18], 0x10
mov dword [ebp - 4], 0x21
jb 0x41080c
mov eax, dword [eax + 4]
jmp 0x41080f
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp - 0xb8]
call fcn.00402d14
lea eax, [ebp - 0x1d0]
push eax
call fcn.00440ee8
pop ecx
cmp dword [eax + 0x18], 0x10
mov dword [ebp - 4], 0x22
jb 0x410846
mov eax, dword [eax + 4]
jmp 0x410849
add eax, 4
push eax
call fcn.0040f76f
or dword [ebp - 4], 0xffffffff
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x1d0]
mov byte [ebp - 0x11], al
call fcn.00402d14
cmp byte [ebp - 0x11], bl
je 0x410887
mov esi, dword [ebp - 0x18]
cmp dword [esi + 0x20], 0x10
jb 0x410877
mov eax, dword [esi + 0xc]
jmp 0x41087a
lea eax, [esi + 0xc]
push 8
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [esi + 4], eax
mov ecx, dword [ebp - 0x18]
xor eax, eax
cmp dword [ecx + 4], ebx
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x104]
xor ecx, ebp
call fcn.0052b318
add ebp, 0x108
leave
ret