Function at 0x402c98
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
jmp 0x46f750
mov eax, dword [esp + 4]
sub esp, 0x78
push ebx
push esi
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x46f78e
push ebx
push ebx
push str.Error_Creating_.res_File
call fcn.004b468e
pop esi
xor eax, eax
pop ebx
add esp, 0x78
ret 0x14
push ebp
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea ecx, [esp + 0x18]
push ecx
mov ebp, 0x20
push ebp
lea edx, [esp + 0x74]
mov eax, 0xffff
push edx
push esi
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebp
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ebx
mov word [esp + 0x90], bx
mov word [esp + 0x92], bx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
call edi
test eax, eax
je 0x46f7f9
mov ecx, ebp
cmp dword [esp + 0x14], ecx
je 0x46f805
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x78
ret 0x14
mov eax, dword [esp + 0x98]
cmp eax, 3
je 0x46f81a
cmp eax, 1
jne 0x46f93c
xor ebp, ebp
cmp eax, 3
jne 0x46f826
mov ebp, 1
movzx edx, word [esp + 0x9c]
xor eax, eax
cmp ebp, ebx
setne al
push ebx
mov dword [esp + 0x50], ecx
shl edx, 0x10
or edx, 0xffff
mov dword [esp + 0x4c], 0x14
mov dword [esp + 0x58], edx
lea eax, [eax + eax + 0xc]
shl eax, 0x10
or eax, 0xffff
mov dword [esp + 0x54], eax
lea eax, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x54]
push ecx
push esi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x70], bx
mov word [esp + 0x72], bx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
call edi
push ebx
neg ebp
lea edx, [esp + 0x18]
push edx
sbb ebp, ebp
push 6
add ebp, 2
lea eax, [esp + 0x3c]
mov word [esp + 0x3e], bp
push eax
mov ebp, 1
push esi
mov word [esp + 0x44], bx
mov word [esp + 0x48], bp
call edi
mov eax, dword [esp + 0x90]
mov dl, byte [eax + 8]
mov cl, byte [eax + 4]
shr dl, 1
cmp dword [esp + 0x98], ebp
mov byte [esp + 0x23], bl
mov word [esp + 0x26], bx
mov byte [esp + 0x20], cl
mov byte [esp + 0x21], dl
jne 0x46f8e2
mov word [esp + 0x24], bx
mov byte [esp + 0x22], bl
jmp 0x46f90f
movzx ecx, word [eax + 0xc]
movzx edx, word [eax + 0xe]
mov word [esp + 0x24], cx
movzx ecx, cx
imul ecx, edx
cmp ecx, 8
jl 0x46f900
mov byte [esp + 0x22], bl
jmp 0x46f90f
movzx ecx, word [eax + 0xc]
imul ecx, edx
mov dl, 1
shl dl, cl
mov byte [esp + 0x22], dl
mov eax, dword [esp + 0x94]
mov cx, word [esp + 0x9c]
push ebx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x30], eax
push 0xe
lea eax, [esp + 0x2c]
push eax
push esi
mov word [esp + 0x40], cx
call edi
mov ebp, 0x54
mov ecx, dword [esp + 0x94]
push ebx
lea edx, [esp + 0x18]
push edx
push 8
lea eax, [esp + 0x54]
push eax
push esi
mov dword [esp + 0x5c], ecx
call edi
mov eax, dword [esp + 0x98]
lea ecx, [ebp + 4]
mov edx, eax
add ebp, 8
shr edx, 0x10
mov dword [esp + 0x1c], ecx
push ebx
je 0x46f9e1
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b14ff
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x9c]
add esp, 4
push ecx
push eax
push 0xffffffffffffffff
push edx
push ebx
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x10]
add eax, eax
push eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.004f40b0
mov eax, dword [esp + 0x1c]
add esp, 0xc
push ebx
lea edx, [esp + 0x18]
push edx
add ebp, eax
push eax
jmp 0x46f9fb
movzx ecx, ax
shl ecx, 0x10
lea edx, [esp + 0x18]
or ecx, 0xffff
push edx
mov dword [esp + 0x58], ecx
add ebp, 4
push 4
lea eax, [esp + 0x5c]
push eax
push esi
call edi
mov eax, dword [esp + 0x9c]
mov ecx, eax
shr ecx, 0x10
push ebx
je 0x46fa83
push ebx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b14ff
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xa0]
add esp, 4
push ecx
push eax
push 0xffffffffffffffff
push edx
push ebx
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x10]
add eax, eax
push eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x5c]
push ecx
call fcn.004f40b0
mov eax, dword [esp + 0x1c]
add esp, 0xc
push ebx
lea edx, [esp + 0x18]
push edx
add ebp, eax
push eax
jmp 0x46fa9d
movzx ecx, ax
shl ecx, 0x10
lea edx, [esp + 0x18]
or ecx, 0xffff
push edx
mov dword [esp + 0x5c], ecx
add ebp, 4
push 4
lea eax, [esp + 0x60]
push eax
push esi
call edi
lea eax, [ebp + 3]
and eax, 0xfffffffc
cmp eax, ebp
je 0x46fac9
push ebx
lea ecx, [esp + 0x18]
push ecx
push 2
lea edx, [esp + 0x1c]
push edx
push esi
mov ebp, eax
mov byte [esp + 0x24], bl
mov byte [esp + 0x25], bl
call edi
push ebx
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x64]
push ecx
push esi
mov dword [esp + 0x6c], ebx
call edi
push ebx
lea edx, [esp + 0x18]
push edx
push 2
lea eax, [esp + 0x68]
push eax
push esi
mov word [esp + 0x70], bx
call edi
push ebx
lea ecx, [esp + 0x18]
push ecx
push 2
lea edx, [esp + 0x6a]
push edx
push esi
mov word [esp + 0x72], bx
call edi
push ebx
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x6c]
push ecx
push esi
mov dword [esp + 0x74], ebx
call edi
push ebx
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x70]
push eax
push esi
mov dword [esp + 0x78], ebx
call edi
mov edx, dword [esp + 0x94]
mov eax, dword [esp + 0x90]
push ebx
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push esi
call edi
mov eax, dword [esp + 0x98]
add ebp, 0xfffffff0
cmp eax, 3
mov dword [esp + 0x4c], ebp
je 0x46fb7e
cmp eax, 1
je 0x46fb7e
mov ecx, dword [esp + 0x1c]
push ebx
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x58]
push eax
push esi
call edi
cmp esi, ebx
je 0x46fb89
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop esi
mov eax, 1
pop ebx
add esp, 0x78
ret 0x14