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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x48077d
push eax
mov dword fs:[0], esp
sub esp, 0x32c
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x22c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [esp + 0x34c]
mov eax, dword [edi + 0x2010]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x100
lea ecx, [esp + 0x130]
push ecx
push 1
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x4290ce
push 0x1d
push str.Error_unpacking_resources__1_
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
call fcn.00415040
mov dword [esp + 0x344], ebx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.00415650
push 0x49aa24
lea ecx, [esp + 0x2c]
push ecx
call fcn.00466bcb
lea edx, [esp + 0x12c]
push edx
call fcn.00464ec8
add esp, 4
cmp eax, ebx
mov dword [edi + 0x200c], eax
jl 0x4294f1
cmp eax, 0x3e8
jg 0x4294f1
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x14], esi
jle 0x4293a8
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x42911d
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x34c]
xor ebx, ebx
lea ecx, [esp + 0x18]
call fcn.00414950
mov dword [esp + 0x344], 2
mov eax, dword [edi + 0x2010]
push esi
push eax
lea ecx, [esp + 0x20]
push str._s_d.csx
push ecx
call fcn.004141b0
mov edx, dword [esp + 0x28]
push 0x488d40
push edx
call fcn.004650d6
mov edi, eax
add esp, 0x18
cmp edi, ebx
je 0x4293d3
add esi, 0x3e8
movzx eax, si
push str.DLLBLOCK
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x1c]
mov ebx, eax
call fcn.00414950
mov byte [esp + 0x344], 5
push ebx
lea ecx, [esp + 0x20]
push str.Error_unpacking_resources__4_:__d
push ecx
call fcn.004141b0
add esp, 0xc
test esi, esi
je 0x42945a
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push 1
push ebx
call fcn.004652da
push edi
call fcn.004653d3
add esp, 0x14
lea edx, [esp + 0x94]
push edx
call fcn.00429540
mov byte [esp + 0x344], 7
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x94], eax
test eax, eax
je 0x42948e
push str.RTCreateObject
push eax
call ebp
mov ecx, dword [esp + 0x94]
push str.RTDestroyObject
push ecx
mov dword [esp + 0xa0], eax
call ebp
mov edx, dword [esp + 0x94]
push str.RTWindowProc
push edx
mov dword [esp + 0xa4], eax
call ebp
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x94]
push str.RTDllLoad
push eax
call ebp
lea ecx, [esp + 0xec]
push ecx
mov dword [esp + 0x28], eax
call fcn.00429690
mov byte [esp + 0x344], 0xa
mov ebx, dword [esp + 0x34c]
mov esi, dword [ebx + 0x1f00]
mov eax, dword [esi + 4]
add ebx, 0x1efc
lea edx, [esp + 0xec]
push edx
push eax
push esi
call fcn.0042b060
mov ecx, ebx
mov edi, eax
call fcn.0042b110
mov ecx, dword [esp + 0x34c]
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov edx, dword [ecx + 0x1f00]
mov esi, dword [edx + 4]
add esi, 8
lea eax, [esi + 0x30]
mov dword [esp + 0x20], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x50]
lea edi, [esi + 0x10]
lea ebx, [esi + 0x20]
push eax
mov dword [esp + 0x54], vtable.MicroAceTool.0
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], ebx
call dword [esp + 0x28]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], edi
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 8]
je 0x42932a
call fcn.00414260
mov ecx, dword [esp + 0xb0]
add edi, 4
cmp edi, dword [ecx + 8]
jne 0x429316
mov esi, dword [esp + 0x34c]
lea edx, [esp + 0x94]
push edx
lea eax, [esi + 0x1f08]
call fcn.00429c70
mov byte [esp + 0x344], 7
lea eax, [esp + 0xec]
push eax
call fcn.00429700
mov byte [esp + 0x344], 5
lea ecx, [esp + 0x94]
push ecx
call fcn.004295b0
mov byte [esp + 0x344], 2
lea ecx, [esp + 0x1c]
call fcn.004149b0
mov dword [esp + 0x344], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.004149b0
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [esi + 0x200c]
mov dword [esp + 0x14], eax
jl 0x429110
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [esp + 0x33c]
pop edi
pop esi
pop ebp
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x338
ret 4
lea ecx, [esp + 0x14]
call fcn.00414950
mov byte [esp + 0x344], 3
call fcn.0046512f
mov edx, dword [eax]
mov eax, dword [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x1c]
push str.Error_unpacking_resources__3_:_could_not_create_file__s___d_
push ecx
call fcn.004141b0
mov edx, dword [esp + 0x24]
mov eax, edx
add esp, 0x10
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], 0
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x429420
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x30]
call fcn.00415040
mov byte [esp + 0x344], 4
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x70]
push eax
call fcn.00415650
push 0x49aa24
lea ecx, [esp + 0x70]
push ecx
call fcn.00466bcb
mov edx, dword [esp + 0x1c]
push edx
lea ecx, [esp + 0x2c]
call fcn.00415120
mov byte [esp + 0x344], 6
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x70]
push ecx
call fcn.00415650
push 0x49aa24
lea edx, [esp + 0x70]
push edx
call fcn.00466bcb
lea ecx, [esp + 0x14]
call fcn.00414950
mov byte [esp + 0x344], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push str.Failed_to_load_plugin__s___d_
push ecx
call fcn.004141b0
mov edx, dword [esp + 0x24]
add esp, 0x10
push edx
lea ecx, [esp + 0x2c]
call fcn.00415120
mov byte [esp + 0x344], 9
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x70]
push ecx
call fcn.00415650
push 0x49aa24
lea edx, [esp + 0x70]
push edx
call fcn.00466bcb
push 0x1d
push str.Error_unpacking_resources__2_
lea ecx, [esp + 0x30]
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
call fcn.00415040
mov dword [esp + 0x344], 1
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x70]
push edx
call fcn.00415650
push 0x49aa24
lea eax, [esp + 0x70]
push eax
call fcn.00466bcb
int3