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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x408258]
xor eax, esp
mov dword [esp + 0x78], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x20], eax
movzx eax, word [edi]
test ax, ax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], 0
je 0x402293
lea esp, [esp]
cmp ax, 0x25
je 0x401c45
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x401c38
mov word [ecx], ax
add ecx, 2
mov dword [esp + 0x20], ecx
add dword [esp + 0x18], 1
add edi, 2
jmp 0x402287
xor esi, esi
xor bl, bl
xor cl, cl
mov dword [esp + 0x30], esi
mov dword [esp + 0x28], 0xffffffff
mov byte [esp + 0x27], 0
mov byte [esp + 0x2f], bl
mov byte [esp + 0x17], cl
xor dl, dl
mov dword [esp + 0x34], 0x20
mov dword [esp + 0x1c], 0x408634
movzx eax, word [edi + 2]
add edi, 2
add eax, 0xffffffe0
cmp eax, 0x10
mov dword [ebp + 0xc], edi
ja case.0x401c8f.33
movzx eax, byte [eax + 0x4022d4]
jmp dword [eax*4 + 0x4022bc]
mov edi, dword [ebp + 0xc]
mov esi, dword [esp + 0x30]
mov byte [esp + 0x27], 1
jmp 0x401c76
mov bl, 1
jmp 0x401c76
mov dword [esp + 0x34], 0x30
jmp 0x401c76
mov edi, dword [ebp + 0xc]
mov esi, dword [esp + 0x30]
mov byte [esp + 0x2f], 1
jmp 0x401c76
mov cl, 1
jmp 0x401c76
movzx eax, word [edi]
cmp ax, 0x2a
jne 0x401ce4
mov eax, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x10], eax
mov eax, dword [eax - 4]
mov dword [esp + 0x30], eax
add edi, 2
jmp 0x401d10
cmp ax, 0x30
jb 0x401d13
cmp ax, 0x39
ja 0x401d13
cmp ax, 0x39
ja 0x401d0c
movzx eax, ax
lea esi, [esi + esi*4]
add edi, 2
lea esi, [eax + esi*2 - 0x30]
movzx eax, word [edi]
cmp ax, 0x30
jae 0x401cf0
mov dword [esp + 0x30], esi
mov dword [ebp + 0xc], edi
cmp word [edi], 0x2e
jne 0x401d6f
movzx eax, word [edi + 2]
add edi, 2
xor esi, esi
cmp ax, 0x2a
mov dword [ebp + 0xc], edi
mov dword [esp + 0x28], esi
jne 0x401d46
mov eax, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x10], eax
mov eax, dword [eax - 4]
mov dword [esp + 0x28], eax
add edi, 2
jmp 0x401d6c
cmp ax, 0x30
jb 0x401d6f
cmp ax, 0x39
ja 0x401d68
movzx eax, ax
lea esi, [esi + esi*4]
add edi, 2
lea esi, [eax + esi*2 - 0x30]
movzx eax, word [edi]
cmp ax, 0x30
jae 0x401d4c
mov dword [esp + 0x28], esi
mov dword [ebp + 0xc], edi
movzx eax, word [edi]
cmp eax, 0x49
je 0x401d8e
cmp eax, 0x68
je 0x401d89
cmp eax, 0x6c
jne 0x401da1
mov edi, dword [ebp + 0xc]
mov byte [esp + 0x17], 1
add edi, 2
jmp 0x401da1
cmp word [edi + 2], 0x36
jne 0x401da1
cmp word [edi + 4], 0x34
jne 0x401da1
add edi, 6
mov dl, 1
movzx eax, word [edi]
add edi, 2
sub eax, 0x25
cmp eax, 0x53
mov dword [ebp + 0xc], edi
ja case.0x401dbd.38
movzx eax, byte [eax + 0x402314]
jmp dword [eax*4 + 0x4022e8]
test dl, dl
mov eax, dword [esp + 0x10]
push 0xa
lea ecx, [esp + 0x3c]
push ecx
je 0x401dec
mov edx, dword [eax + 4]
add eax, 8
mov dword [esp + 0x18], eax
mov eax, dword [eax - 8]
push edx
push eax
call fcn.00402370
add esp, 0x10
jmp 0x401e0c
mov edx, dword [eax]
add eax, 4
cmp byte [esp + 0x1f], 0
mov dword [esp + 0x18], eax
push edx
je 0x401e04
call fcn.00402500
jmp 0x401e09
call fcn.00402500
add esp, 0xc
cmp word [esp + 0x38], 0x2d
jne 0x401e21
mov dword [esp + 0x1c], 0x408294
jmp case.0x401dbd.110
test bl, bl
je 0x401e32
mov dword [esp + 0x1c], 0x408290
jmp case.0x401dbd.110
cmp byte [esp + 0x2f], 0
je case.0x401dbd.110
mov dword [esp + 0x1c], 0x4082a8
jmp case.0x401dbd.110
test dl, dl
je 0x401e75
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
add eax, 8
push 0xa
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x18], eax
mov eax, dword [eax - 8]
push edx
push eax
call fcn.004025b0
add esp, 0x10
jmp case.0x401dbd.110
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
add eax, 4
push 0xa
lea ecx, [esp + 0x3c]
push ecx
push edx
mov dword [esp + 0x1c], eax
call fcn.00402720
add esp, 0xc
jmp case.0x401dbd.110
test dl, dl
jne 0x401e4e
test cl, cl
je 0x401ea7
mov dword [esp + 0x1c], 0x4082ac
mov eax, dword [esp + 0x10]
mov esi, dword [eax]
add eax, 4
push 8
lea ecx, [esp + 0x3c]
push ecx
push esi
mov dword [esp + 0x1c], eax
call fcn.00402720
add esp, 0xc
test esi, esi
jne case.0x401dbd.110
mov dword [esp + 0x1c], 0x408634
jmp case.0x401dbd.110
test cl, cl
je 0x401ede
mov dword [esp + 0x1c], 0x408298
test dl, dl
mov eax, dword [esp + 0x10]
push 0x10
je 0x401f07
mov edi, dword [eax + 4]
mov esi, dword [eax]
add eax, 8
lea edx, [esp + 0x3c]
push edx
push edi
push esi
mov dword [esp + 0x20], eax
call fcn.004025b0
add esp, 0x10
or esi, edi
jmp 0x401f20
mov esi, dword [eax]
add eax, 4
mov dword [esp + 0x14], eax
lea eax, [esp + 0x3c]
push eax
push esi
call fcn.00402720
add esp, 0xc
test esi, esi
jne 0x401f2a
mov dword [esp + 0x1c], 0x408634
lea ecx, [esp + 0x38]
push ecx
call fcn.004027d0
mov edi, dword [ebp + 0xc]
add esp, 4
mov edx, dword [esp + 0x28]
cmp edx, 0xffffffff
jne 0x401f48
mov edx, 1
cmp word [esp + 0x38], 0x2d
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], ecx
jne 0x401f60
lea ecx, [esp + 0x3a]
mov dword [esp + 0x28], ecx
test ecx, ecx
jne 0x402040
xor esi, esi
jmp 0x402056
test cl, cl
je 0x401f7b
mov dword [esp + 0x1c], 0x4082a0
test dl, dl
mov eax, dword [esp + 0x10]
push 0x10
je 0x401fa4
mov edi, dword [eax + 4]
mov esi, dword [eax]
add eax, 8
lea edx, [esp + 0x3c]
push edx
push edi
push esi
mov dword [esp + 0x20], eax
call fcn.004025b0
add esp, 0x10
or esi, edi
jmp 0x401fbd
mov esi, dword [eax]
add eax, 4
mov dword [esp + 0x14], eax
lea eax, [esp + 0x3c]
push eax
push esi
call fcn.00402720
add esp, 0xc
test esi, esi
jne 0x401fc7
mov dword [esp + 0x1c], 0x408634
lea ecx, [esp + 0x38]
push ecx
call fcn.00402800
jmp 0x401f34
mov eax, dword [esp + 0x10]
mov dx, word [eax]
add eax, 4
mov dword [esp + 0x10], eax
mov word [esp + 0x38], dx
lea esi, [esp + 0x38]
mov eax, 1
jmp 0x4021f6
mov eax, dword [esp + 0x10]
mov esi, dword [eax]
add eax, 4
test esi, esi
mov dword [esp + 0x10], eax
jne 0x40200c
xor eax, eax
jmp 0x402022
mov eax, esi
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402010
sub eax, esi
sar eax, 1
sub eax, 1
cmp dword [esp + 0x28], 0xffffffff
je 0x4021f6
cmp dword [esp + 0x28], eax
jge 0x4021f6
mov eax, dword [esp + 0x28]
jmp 0x4021f6
mov eax, ecx
mov si, word [eax]
add eax, 2
test si, si
jne 0x402042
sub eax, ecx
sar eax, 1
sub eax, 1
mov esi, eax
sub edx, esi
jns 0x40205c
xor edx, edx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x402068
xor eax, eax
jmp 0x402082
mov eax, ebx
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402070
sub eax, ebx
sar eax, 1
sub eax, 1
mov ecx, dword [esp + 0x30]
sub ecx, eax
sub ecx, edx
sub ecx, esi
jns 0x402090
xor ecx, ecx
cmp word [esp + 0x34], 0x30
jne 0x4020ca
movzx eax, word [ebx]
test ax, ax
je 0x4020ca
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x4020b3
mov word [ebx], ax
add ebx, 2
add dword [esp + 0x1c], 2
mov eax, dword [esp + 0x1c]
movzx eax, word [eax]
add dword [esp + 0x18], 1
test ax, ax
jne 0x4020a4
mov dword [esp + 0x20], ebx
jmp 0x4020ce
mov ebx, dword [esp + 0x20]
test ecx, ecx
je 0x4020f6
cmp byte [esp + 0x27], 0
jne 0x4020f6
add dword [esp + 0x18], ecx
mov eax, dword [esp + 0x34]
sub ecx, 1
test ebx, ebx
je 0x4020ee
mov word [ebx], ax
add ebx, 2
test ecx, ecx
jne 0x4020e1
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x1c]
movzx eax, word [eax]
test ax, ax
je 0x402126
test ebx, ebx
je 0x402111
mov word [ebx], ax
add ebx, 2
add dword [esp + 0x1c], 2
mov eax, dword [esp + 0x1c]
movzx eax, word [eax]
add dword [esp + 0x18], 1
test ax, ax
jne 0x402102
mov dword [esp + 0x20], ebx
test edx, edx
mov eax, dword [esp + 0x28]
jle 0x40214d
add dword [esp + 0x18], edx
sub edx, 1
test ebx, ebx
je 0x402141
mov word [ebx], 0x30
add ebx, 2
test edx, edx
jg 0x402132
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], ebx
test esi, esi
jle 0x402170
add dword [esp + 0x18], esi
sub esi, 1
test ebx, ebx
je 0x402168
mov dx, word [eax]
mov word [ebx], dx
add ebx, 2
add eax, 2
test esi, esi
jg 0x402155
mov dword [esp + 0x20], ebx
test ecx, ecx
je 0x402287
add dword [esp + 0x18], ecx
mov eax, dword [esp + 0x20]
sub ecx, 1
test eax, eax
je 0x40218f
mov word [eax], 0x20
add eax, 2
test ecx, ecx
jne 0x402180
mov dword [esp + 0x20], eax
jmp 0x402287
mov word [esp + 0x38], 0x25
lea esi, [esp + 0x38]
mov eax, 1
jmp 0x4021f6
mov esi, 0x4082b0
xor eax, eax
cmp eax, esi
je 0x4021f6
mov eax, 0x4082b0
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4021c0
jmp 0x4021ec
mov esi, 0x4082b0
xor edx, edx
cmp edx, esi
jne 0x4021dc
xor eax, eax
jmp 0x4021f6
mov eax, 0x4082b0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4021e1
sub eax, 0x4082b0
sar eax, 1
sub eax, 1
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jle 0x402231
sub ecx, eax
test ecx, ecx
je 0x402233
cmp byte [esp + 0x27], 0
jne 0x402233
add dword [esp + 0x18], ecx
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x34]
sub ecx, 1
test edx, edx
je 0x402224
mov word [edx], bx
add edx, 2
test ecx, ecx
jne 0x402217
mov dword [esp + 0x20], edx
sub ecx, 1
jmp 0x402237
xor ecx, ecx
mov edx, dword [esp + 0x20]
test eax, eax
jle 0x40225b
add dword [esp + 0x18], eax
nop
sub eax, 1
test edx, edx
je 0x402253
mov bx, word [esi]
mov word [edx], bx
add edx, 2
add esi, 2
test eax, eax
jg 0x402240
mov dword [esp + 0x20], edx
test ecx, ecx
je 0x402287
cmp byte [esp + 0x27], 0
je 0x402287
add dword [esp + 0x18], ecx
lea ebx, [ebx]
sub ecx, 1
test edx, edx
je 0x40227f
mov word [edx], 0x20
add edx, 2
test ecx, ecx
jne 0x402270
mov dword [esp + 0x20], edx
movzx eax, word [edi]
test ax, ax
jne 0x401c20
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4022a0
mov word [eax], 0
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00404656
mov esp, ebp
pop ebp
ret