Function at 0x402343
Capabilities:
Terminate process

Disassembly:
mov eax, 0x1264
call fcn.004032f0
mov eax, dword [0x419020]
xor eax, dword [esp + 0x1264]
push ebx
push edi
push 0x401a48
push dword [0x41d850]
xor ebx, ebx
mov dword [esp + 0x1270], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.MSVCR70.dll__wfopen]
push dword [0x41d850]
mov edi, dword [sym.imp.MSVCR70.dll_wcscpy]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x4c]
push eax
call edi
add esp, 0x10
cmp dword [esp + 0xc], ebx
jne 0x4023b7
push dword [0x41d850]
push 0x401a14
call dword [sym.imp.MSVCR70.dll_printf]
pop ecx
pop ecx
xor al, al
jmp 0x402a2a
push ebp
mov ebp, dword [sym.imp.MSVCR70.dll_printf]
push esi
mov eax, dword [esp + 0x14]
test byte [eax + 0xc], 0x10
jne 0x402883
push dword [esp + 0x14]
inc dword [esp + 0x14]
lea eax, [esp + 0xa74]
push 0x800
push eax
call dword [sym.imp.MSVCR70.dll_fgetws]
lea eax, [esp + 0xa7c]
add esp, 0xc
lea ebx, [esp + 0x18]
mov dword [esp + 0x18], eax
call fcn.004022bd
mov esi, eax
test esi, esi
je 0x402873
cmp word [esi], 0x23
je 0x402873
mov ebx, dword [sym.imp.MSVCR70.dll__wcsicmp]
push 0x401a00
push esi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x402518
lea ebx, [esp + 0x18]
call fcn.004022bd
test eax, eax
mov dword [esp + 0x20], eax
jne 0x40244f
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4019e0
jmp 0x4027d0
mov esi, dword [esp + 0x24]
cmp esi, 4
jne 0x40246b
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4019b0
jmp 0x4027d0
mov eax, dword [esp + 0x14]
mov dword [esp + esi*4 + 0x28], eax
mov eax, dword [esp + 0x10]
mov dword [esp + esi*4 + 0x38], eax
lea eax, [esp + 0x48]
push eax
mov eax, esi
imul eax, eax, 0x208
lea eax, [esp + eax + 0x254]
push eax
call edi
push dword [esp + 0x28]
lea eax, [esp + 0x54]
inc esi
push eax
mov dword [esp + 0x34], esi
call edi
mov ebx, dword [sym.imp.MSVCR70.dll__wfopen]
lea eax, [esp + 0x58]
push 0x401a48
push eax
call ebx
add esp, 0x18
test eax, eax
mov dword [esp + 0x14], eax
jne 0x40250e
imul esi, esi, 0x208
lea eax, [esp + esi + 0x48]
push eax
lea eax, [esp + 0x4c]
push eax
call edi
lea eax, [esp + 0x50]
push 0x5c
push eax
call dword [sym.imp.MSVCR70.dll_wcsrchr]
add esp, 0x10
test eax, eax
je 0x40291c
push dword [esp + 0x20]
add eax, 2
push eax
call edi
lea eax, [esp + 0x50]
push 0x401a48
push eax
call ebx
add esp, 0x10
test eax, eax
mov dword [esp + 0x14], eax
je 0x40291c
and dword [esp + 0x10], 0
jmp 0x402873
push 0x4019a4
push esi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x402639
and dword [esp + 0x1c], eax
lea ebx, [esp + 0x18]
call fcn.004022bd
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x40243c
mov esi, dword [sym.imp.MSVCR70.dll__wcsicmp]
push 0x4014a0
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x402563
mov dword [esp + 0x1c], 1
jmp 0x4025a9
push 0x401494
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x40257b
mov dword [esp + 0x1c], 2
jmp 0x4025a9
push 0x401484
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x402593
mov dword [esp + 0x1c], 3
jmp 0x4025a9
push 0x40146c
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x4025a9
mov dword [esp + 0x1c], 4
lea ebx, [esp + 0x18]
call fcn.004022bd
test eax, eax
jne 0x40243c
xor esi, esi
cmp word [0x419640], si
je 0x4025d8
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x401964
jmp 0x4027d0
mov eax, dword [0x41d844]
cmp eax, esi
je 0x40261b
push eax
call dword [sym.imp.MSVCR70.dll_wcslen]
push dword [0x41d844]
mov esi, eax
push 0x419640
call edi
mov eax, dword [0x41d844]
mov ax, word [eax + esi*2 - 2]
add esp, 0xc
cmp ax, 0x3a
je 0x40261b
cmp ax, 0x5c
je 0x40261b
mov word [esi*2 + 0x419640], 0x5c
inc esi
push dword [esp + 0x20]
lea eax, [esi*2 + 0x419640]
push eax
call edi
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
mov dword [0x5248a8], eax
jmp 0x402873
push 0x401954
push esi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x4026a3
lea ebx, [esp + 0x18]
call fcn.004022bd
test eax, eax
je 0x40243c
push 0xa
push 0
push eax
call dword [sym.imp.MSVCR70.dll_wcstoul]
add esp, 0xc
test eax, eax
jne 0x40267d
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x401930
jmp 0x4027d0
cmp dword [0x52487c], 0
je 0x402699
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4018f8
jmp 0x4027d0
mov dword [0x52487c], eax
jmp 0x402873
push 0x4018e8
push esi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x40270d
lea ebx, [esp + 0x18]
call fcn.004022bd
test eax, eax
je 0x40243c
push 0x10
push 0
push eax
call dword [sym.imp.MSVCR70.dll_wcstoul]
add esp, 0xc
test eax, eax
jne 0x4026e7
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4018c0
jmp 0x4027d0
cmp dword [0x524888], 0
je 0x402703
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x401884
jmp 0x4027d0
mov dword [0x524888], eax
jmp 0x402873
push 0x401864
push esi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x402782
lea ebx, [esp + 0x18]
call fcn.004022bd
test eax, eax
je 0x40243c
push 0xa
push 0
push eax
call dword [sym.imp.MSVCR70.dll_wcstoul]
add esp, 0xc
test eax, eax
je 0x402758
cmp eax, 2
je 0x402758
cmp eax, 4
je 0x402758
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x401838
jmp 0x4027d0
cmp byte [0x524894], 0
je 0x402771
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4017fc
jmp 0x4027d0
mov dword [0x421870], eax
mov byte [0x524894], 1
jmp 0x402873
push 0x4017e8
push esi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x4027f4
lea ebx, [esp + 0x18]
call fcn.004022bd
test eax, eax
je 0x40243c
push 0xa
push 0
push eax
call dword [sym.imp.MSVCR70.dll_wcstoul]
add esp, 0xc
cmp eax, 2
jb 0x4027e4
cmp eax, 8
ja 0x4027e4
cmp dword [0x4a187c], 0
je 0x4027da
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4017b4
call ebp
add esp, 0xc
jmp 0x402873
mov dword [0x4a187c], eax
jmp 0x402873
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x40178c
jmp 0x4027d0
cmp word [esi], 0x55
jne 0x402804
cmp word [esi + 2], 0x2b
jne 0x402804
add esi, 4
push 0x10
push 0
push esi
call dword [sym.imp.MSVCR70.dll_wcstoul]
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x402855
jmp 0x402822
cmp word [esi], 0x30
jne 0x402833
inc esi
inc esi
movzx eax, word [esi]
push eax
call dword [sym.imp.MSVCR70.dll_isalnum]
test eax, eax
pop ecx
jne 0x40281a
jmp 0x402846
push dword [esp + 0x10]
lea eax, [esp + 0x4c]
push eax
push 0x4019e0
call ebp
add esp, 0xc
movzx eax, word [esi]
push eax
call dword [sym.imp.MSVCR70.dll_isalnum]
test eax, eax
pop ecx
jne 0x402873
inc dword [0x421868]
xor edx, edx
mov ecx, ebx
and ecx, 0xf
inc edx
mov eax, ebx
shr eax, 4
shl edx, cl
lea eax, [eax*4 + 0x419848]
or dword [eax], edx
mov eax, dword [esp + 0x14]
test byte [eax + 0xc], 0x10
je 0x4023cd
xor ebx, ebx
push dword [esp + 0x14]
call dword [sym.imp.MSVCR70.dll_fclose]
mov eax, dword [esp + 0x28]
cmp eax, ebx
pop ecx
je 0x4028ca
mov esi, dword [esp + eax*4 + 0x24]
mov ecx, dword [esp + eax*4 + 0x34]
dec eax
mov dword [esp + 0x24], eax
imul eax, eax, 0x208
lea eax, [esp + eax + 0x250]
push eax
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ecx
call edi
cmp esi, ebx
pop ecx
pop ecx
jne 0x4023bf
cmp dword [0x41d854], ebx
je 0x40293a
cmp word [0x419640], bx
je 0x4028e3
push 0x401748
call ebp
pop ecx
push dword [0x41d854]
push 0x419640
call edi
pop ecx
pop ecx
mov dword [0x5248a8], ebx
cmp dword [0x5248a4], ebx
je 0x40294a
cmp dword [0x5248a8], ebx
je 0x402910
push 0x4016f8
call ebp
pop ecx
mov eax, dword [0x5248a4]
mov dword [0x5248a8], eax
jmp 0x40295c
push dword [esp + 0x20]
lea eax, [esp + 0x4c]
push dword [esp + 0x14]
push eax
push 0x4016c0
call ebp
add esp, 0x10
xor al, al
jmp 0x402a28
cmp word [0x419640], bx
jne 0x4028f8
push 0x401690
jmp 0x4029bb
cmp dword [0x5248a8], ebx
jne 0x40295c
mov dword [0x5248a8], 1
cmp dword [0x52489c], ebx
je 0x4029c3
cmp dword [0x52487c], ebx
je 0x402974
push 0x401648
call ebp
pop ecx
mov eax, dword [0x52489c]
mov dword [0x52487c], eax
cmp dword [0x41d864], ebx
je 0x4029d2
cmp dword [0x524888], ebx
je 0x402996
push 0x401600
call ebp
pop ecx
mov eax, dword [0x41d864]
mov dword [0x524888], eax
xor edx, edx
mov ecx, eax
and ecx, 0xf
inc edx
shl edx, cl
shr eax, 4
test dword [eax*4 + 0x419848], edx
jne 0x4029e2
push 0x4015a8
call ebp
pop ecx
jmp 0x402933
cmp dword [0x52487c], ebx
jne 0x40297e
push 0x401578
jmp 0x4029bb
mov eax, dword [0x524888]
cmp eax, ebx
jne 0x4029a0
push 0x401548
jmp 0x4029bb
cmp byte [0x421874], bl
je 0x402a04
cmp byte [0x524894], bl
je 0x4029fa
push 0x4014f8
call ebp
pop ecx
mov eax, dword [0x42186c]
mov dword [0x421870], eax
cmp dword [0x524890], ebx
je 0x402a26
cmp dword [0x4a187c], ebx
je 0x402a1c
push 0x4014b0
call ebp
pop ecx
mov eax, dword [0x524890]
mov dword [0x4a187c], eax
mov al, 1
pop esi
pop ebp
mov ecx, dword [esp + 0x1268]
xor ecx, dword [esp + 0x126c]
pop edi
pop ebx
add esp, 0x1264
jmp fcn.004032d6