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

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x412040]
test eax, eax
je 0x4043f8
cmp byte [eax], 0
jne 0x4047a2
mov dword [esp + 4], 0xa0
mov dword [esp], 1
call sym._calloc
test eax, eax
mov dword [0x412040], eax
je 0x4047a2
call sym._PDC_scr_open
cmp eax, 0xffffffff
je 0x4047ab
mov ebx, dword [0x412040]
mov edi, 0xffffffff
mov byte [ebx + 1], 1
mov byte [ebx + 5], 0
mov byte [ebx + 4], 0
mov byte [ebx + 2], 1
mov dword [ebx + 0x4c], 0
mov byte [ebx + 0x50], 0
mov byte [ebx + 3], 1
mov dword [ebx + 0x18], 1
mov byte [ebx + 8], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x40], 0
mov word [ebx + 0x68], di
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x74], 0
mov byte [ebx + 0x78], 0
mov byte [ebx + 0x79], 0
mov dword [ebx + 0x7c], 0xffffffff
mov dword [ebx + 0x80], 0xffffffff
call sym._PDC_get_cursor_mode
mov dword [ebx + 0x1c], eax
mov ebx, dword [0x412040]
call sym._PDC_get_rows
mov dword [0x412034], eax
mov dword [ebx + 0x20], eax
mov ebx, dword [0x412040]
call sym._PDC_get_columns
cmp eax, 1
mov dword [0x412030], eax
mov edx, dword [0x412034]
mov dword [ebx + 0x24], eax
jle 0x40487b
cmp edx, 1
jle 0x40487b
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._newwin
test eax, eax
mov dword [0x41203c], eax
je 0x404847
mov eax, dword [0x412030]
mov ebx, dword [0x412040]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [0x412034]
mov dword [esp], eax
call sym._newwin
mov dword [ebx + 0x70], eax
mov eax, dword [0x412040]
mov eax, dword [eax + 0x70]
test eax, eax
je 0x404813
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sym._wattrset
mov eax, dword [0x412040]
mov eax, dword [eax + 0x70]
mov dword [esp], eax
call sym._werase
call sym._PDC_slk_initialize
mov edx, dword [0x412040]
mov eax, dword [0x412034]
sub eax, dword [edx + 0x30]
cmp byte [0x412080], 0
mov dword [0x412034], eax
jle 0x404620
xor ebx, ebx
jmp 0x4045f9
mov eax, dword [edx + 0x3c]
mov esi, dword [0x412030]
lea ecx, [eax + 1]
mov dword [edx + 0x3c], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], esi
add ebx, 1
mov dword [esp], 1
call sym._newwin
mov dword [esp + 4], esi
mov dword [esp], eax
call edi
movsx ecx, byte [0x412080]
mov eax, dword [0x412034]
mov edx, dword [0x412040]
sub eax, 1
add dword [edx + 0x38], 1
cmp ecx, ebx
mov dword [0x412034], eax
jle 0x404620
mov esi, dword [ebx*8 + 0x412d20]
mov edi, dword [ebx*8 + 0x412d24]
test esi, esi
jns 0x4045a0
mov esi, dword [0x412030]
mov dword [esp + 0xc], 0
sub eax, 1
jmp 0x4045b7
mov dword [esp + 0xc], 0
mov edx, dword [edx + 0x3c]
mov dword [esp], eax
mov byte [0x412080], 0
mov dword [esp + 8], edx
mov edx, dword [0x412030]
mov dword [esp + 4], edx
call sym._newwin
test eax, eax
mov dword [0x412038], eax
je 0x4047df
mov dword [esp], eax
call sym._wclrtobot
mov ebx, dword [0x412040]
mov eax, dword [0x41203c]
cmp byte [ebx + 0x44], 0
jne 0x404770
mov byte [eax + 0x24], 1
mov dword [esp + 4], 0xc
mov dword [esp], 0x100
call sym._calloc
test eax, eax
mov dword [ebx + 0x9c], eax
je 0x4047a2
call sym._PDC_init_atrtab
xor eax, eax
xor edx, edx
xor ecx, ecx
mov word [0x412d08], ax
mov eax, dword [0x412040]
mov word [0x412d0a], dx
mov word [0x412d0c], cx
mov dword [0x412d04], 0xffffffff
mov dword [0x412d00], 0xffffffff
mov dword [0x412d10], 0
mov byte [eax], 1
call sym._def_shell_mode
call sym._PDC_sysname
mov dword [esp + 4], str.pdcursesPDCurses_for__s
mov dword [esp + 8], eax
mov dword [esp], 0x412c80
call sym._sprintf
mov ebx, dword [0x412040]
mov dword [esp], 0x800
call sym._malloc
test eax, eax
mov dword [ebx + 0x84], eax
je 0x4047a2
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], 1
mov dword [esp], 0x400
call sym._malloc
test eax, eax
mov dword [ebx + 0x90], eax
je 0x4047a2
mov dword [ebx + 0x94], 0
mov dword [ebx + 0x98], 0x100
mov eax, dword [0x412038]
add esp, 0x10
pop ebx
pop esi
pop edi
ret
mov dword [esp], eax
call sym._untouchwin
mov eax, dword [0x412038]
mov dword [esp], eax
call sym._untouchwin
mov eax, dword [0x412038]
mov ebx, dword [0x412040]
mov byte [eax + 0x24], 0
mov eax, dword [0x41203c]
mov byte [eax + 0x24], 0
jmp 0x404676
add esp, 0x10
xor eax, eax
pop ebx
pop esi
pop edi
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1f
mov dword [esp + 4], 1
mov dword [esp], str.initscr__:_Unable_to_create_SP_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov dword [esp], 8
call sym._exit
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x24
mov dword [esp + 4], 1
mov dword [esp], str.initscr__:_Unable_to_create_stdscr._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov dword [esp], 1
call sym._exit
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x29
mov dword [esp + 4], 1
mov dword [esp], str.initscr__:_Unable_to_create_SP__lastscr._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov dword [esp], 2
call sym._exit
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x24
mov dword [esp + 4], 1
mov dword [esp], str.initscr__:_Unable_to_create_curscr._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov dword [esp], 2
call sym._exit
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], edx
mov dword [esp + 4], str.initscr__:_LINES_d_COLS_d:_too_small._n
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 4
call sym._exit
mov esi, esi
lea edi, [edi]