Function at 0x4046e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
mov eax, dword [0x4209bc]
mov ecx, dword [0x4209c0]
mov edx, dword [0x4209c4]
push ebx
push ebp
mov dword [esp + 0x10], eax
mov eax, dword [0x4209c8]
push esi
push edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
call fcn.004070f0
push 0x2211970
call fcn.004102a0
mov ebp, dword [esp + 0x68]
mov ecx, 0xe
mov esi, ebp
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
mov cl, byte [ebp + 0x3c]
add esp, 4
mov byte [0x2211a60], cl
mov dl, byte [ebp + 0x3b]
mov byte [0x221198b], dl
mov ax, word [ebp + 0x64]
mov word [0x2211a7c], ax
mov al, byte [ebp + 0x44]
xor ebx, ebx
cmp al, 1
jne 0x404759
mov word [ebp + 0x52], bx
mov al, byte [esp + 0x2a]
test al, 1
je 0x40476a
test al, 2
mov eax, 0x1f4
jne 0x40476f
mov eax, 0x172
xor ecx, ecx
xor esi, esi
mov cx, word [ebp + 0x66]
mov si, word [0x1855cc2]
sub ecx, eax
mov edi, dword [esp + 0x3c]
imul ecx, esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
fild qword [esp + 0x10]
and edi, 0xffff
fmul qword [0x41c1e0]
call fcn.004112ac
xor ecx, ecx
mov edx, eax
mov cx, word [ebp + 0x52]
mov eax, 0xe4b17e4b
add ecx, edi
mov dword [esp + 0x64], edx
imul ecx, esi
imul ecx
sar edx, 6
mov eax, edx
mov dword [esp + 0x14], ebx
shr eax, 0x1f
add edx, eax
mov eax, 0x1b4e81b5
mov ecx, edx
mov edx, dword [esp + 0x64]
sub ecx, edx
mov edx, edi
imul edx, esi
imul edx
sar edx, 6
mov eax, edx
mov dword [0x2211a94], ecx
shr eax, 0x1f
add edx, eax
mov eax, 0x1b4e81b5
push edx
xor edx, edx
mov dx, word [ebp + 0x52]
mov dword [esp + 0x14], ecx
imul edx, esi
fild qword [esp + 0x14]
fmul qword [0x41c1d8]
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
push edx
xor edx, edx
mov dx, word [ebp + 0x66]
push edx
call fcn.004112ac
cdq
idiv esi
push eax
push 0x420990
call fcn.00403250
xor eax, eax
mov ax, word [0x1855cc2]
imul eax, edi
mov dword [esp + 0x78], eax
fild dword [esp + 0x78]
fmul qword [0x41c1d0]
call fcn.004112ac
mov word [0x2211a7e], ax
mov ecx, 7
xor eax, eax
mov edi, 0x2211a60
rep stosd dword es:[edi], eax
mov eax, dword [0x1855cc4]
and eax, 0xff
movzx cx, byte [eax + 0x1855ccd]
mov dx, word [eax*2 + 0x1855cd8]
mov word [0x2211a68], cx
movzx ax, byte [esp + 0x3f]
mov word [0x2211a6a], dx
mov word [0x2211a6c], ax
mov ebx, dword [esp + 0x41]
xor cx, cx
mov cl, bl
mov word [0x1855c98], ax
mov word [0x1855c9c], cx
movzx cx, byte [esp + 0x5c]
mov word [0x1855ca2], cx
movzx cx, byte [esp + 0x5f]
movzx ax, byte [esp + 0x40]
mov word [0x1855ca8], cx
mov cl, byte [esp + 0x64]
mov byte [0x1855d0a], cl
mov cl, byte [esp + 0x65]
movzx dx, byte [esp + 0x5a]
mov byte [0x1855d0b], cl
mov cl, byte [esp + 0x66]
mov byte [0x1855d0c], cl
mov cl, byte [esp + 0x67]
mov word [0x1855c9a], ax
mov byte [0x1855d0d], cl
movzx ax, byte [esp + 0x5b]
mov cl, byte [esp + 0x68]
mov word [0x1855c9e], dx
mov byte [0x1855d59], cl
mov cl, byte [esp + 0x69]
mov word [0x1855ca0], ax
mov eax, dword [esp + 0x5d]
xor dx, dx
mov byte [0x1855d5a], cl
mov cl, byte [esp + 0x6a]
mov dl, al
movzx ax, ah
mov byte [0x1855d5b], cl
mov cl, byte [esp + 0x6b]
mov byte [0x1855d5c], cl
mov cl, byte [esp + 0x6c]
mov word [0x1855ca4], dx
mov edx, dword [esp + 0x60]
mov word [0x1855ca6], ax
xor ax, ax
mov byte [0x1855d5d], cl
mov cx, word [esp + 0x46]
mov al, dl
mov word [0x2211a6e], cx
mov word [0x1855caa], ax
mov eax, dword [esp + 0x62]
mov word [0x1855cb0], cx
mov cx, word [esp + 0x48]
mov byte [0x1855d09], ah
mov word [0x1855cb2], cx
mov cx, word [esp + 0x4a]
mov byte [0x1855ced], al
and eax, 0xff
mov word [0x1855cb4], cx
mov cx, word [esp + 0x4c]
mov byte [0x1855cec], dh
lea eax, [eax + eax*2]
mov word [0x1855cb6], cx
lea ecx, [eax + eax*4]
mov eax, 0x51eb851f
shl ecx, 3
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
push edx
call fcn.00403ca0
mov cl, byte [esp + 0x56]
mov dl, byte [esp + 0x57]
mov al, byte [esp + 0x58]
mov byte [0x1855cb9], cl
mov cl, byte [esp + 0x59]
mov byte [0x1855cba], dl
mov dl, byte [esp + 0x5a]
mov byte [0x1855cbb], al
mov al, byte [esp + 0x5b]
mov byte [0x1855cbc], cl
mov cl, byte [esp + 0x5c]
mov byte [0x1855cbd], dl
mov byte [0x1855cbe], al
mov dl, byte [esp + 0x5d]
mov ax, word [esp + 0x48]
mov byte [0x1855cbf], cl
mov cx, word [esp + 0x52]
mov byte [0x1855cc0], dl
mov dl, byte [esp + 0x42]
mov word [0x2211a70], cx
mov dword [0x2211a74], 0x64000
mov word [0x2211a66], ax
mov byte [0x2211a61], bh
mov byte [0x2211a79], dl
mov al, byte [ebp + 0x39]
lea ecx, [esp + 0x30]
mov byte [0x2211a64], al
push ecx
call fcn.00404220
mov edx, dword [0x1855c9c]
mov ecx, dword [0x1855c98]
xor eax, eax
and edx, 0xffff
mov ax, word [0x1855c9a]
push edx
and ecx, 0xffff
push eax
push ecx
push 0x420978
call fcn.00403250
mov al, byte [0x2211a79]
add esp, 0x2c
test al, 1
je 0x404abf
push str.PHA_enable
call fcn.00403250
mov al, byte [0x2211a79]
add esp, 4
jmp 0x404ad1
test al, 2
je 0x404ae2
mov dx, word [0x2211a66]
add word [0x2211a7e], dx
test al, 2
je 0x404ae2
push str.PHB_enable
call fcn.00403250
add esp, 4
push str.get_parameter_n
call fcn.00403250
mov eax, dword [esp + 0x2f]
and eax, 0xff
push eax
push str.PhLinesDb_0____d_n
call fcn.00403250
mov eax, dword [esp + 0x38]
and eax, 0xff
push eax
push str.PhLinesDb_1____d_n
call fcn.00403250
and ebx, 0xff
push ebx
push str.PhLinesDb_2____d_n
call fcn.00403250
mov eax, dword [esp + 0x65]
and eax, 0xff
push eax
push str.PhLinesDb_Image_High___d_n
call fcn.00403250
mov eax, dword [esp + 0x6f]
and eax, 0xff
push eax
push str.PhLinesDb_Image_Low___d_n
call fcn.00403250
mov eax, dword [esp + 0x78]
and eax, 0xff
push eax
push str.PhLinesDb_Photo___d_n
call fcn.00403250
push str._n
call fcn.00403250
add esp, 0x38
mov dword [0x2211978], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret