Function at 0x4020f0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x88
push ebx
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push edi
push 0x80000000
push dword [ebp + 0x78]
mov ebx, eax
mov dword [ebp + 0x6c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4021f0
mov eax, dword [0x413050]
push edi
push esi
mov dword [ebp + 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
lea ecx, [ebp + 0x14]
push ecx
mov dword [ebp + 0x64], eax
push eax
inc eax
lea ecx, [ebp + 0x5c]
mov dword [ebp + 0x14], edi
call fcn.0040697e
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0x64]
lea ecx, [ebp + 0x5c]
call fcn.00406917
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp + 0x5c]
lea esi, [ebp + 0x58]
call fcn.004068ee
mov eax, dword [ebp + 0x58]
cmp dword [eax - 8], edi
je 0x4021cb
lea eax, [ebp - 0x18]
call fcn.0040d669
mov esi, dword [ebp + 0x58]
mov eax, dword [esi - 8]
push 0xfde9
lea edi, [ebp - 0x18]
call fcn.0040e146
cmp dword [ebp + 0xc], 0
jne 0x4021b9
mov eax, edi
call fcn.0040d217
mov esi, eax
test esi, esi
je 0x4021b9
push str.setuppackinfo
lea eax, [esi + 0x14]
call fcn.00403357
test al, al
je 0x4021f7
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x410760
call fcn.0040d1b3
mov eax, dword [ebp + 0x58]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4021dc
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x5c]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4021f0
push eax
call fcn.004018e7
xor eax, eax
jmp 0x4027d3
push 0x410cb8
lea eax, [ebp + 0x54]
mov ecx, esi
call fcn.0040d329
mov eax, dword [eax]
lea ecx, [ebp + 0x64]
push 0
push ecx
call fcn.00406849
pop ecx
mov edi, eax
mov eax, dword [ebp + 0x7c]
pop ecx
call fcn.004019e8
mov eax, dword [ebp + 0x64]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402233
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x54]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402247
push eax
call fcn.004018e7
and dword [ebp + 0x54], 0
mov eax, esi
call fcn.0040d217
test eax, eax
mov dword [ebp + 0x68], eax
je 0x402799
and dword [ebp + 0x48], 0
mov edi, eax
lea ecx, [edi + 0x14]
lea esi, [ebp + 0x50]
call fcn.004068ee
push str.proxy
push dword [ebp + 0x50]
call dword [sym.imp.MSVCRT.dll__mbscmp]
test eax, eax
pop ecx
pop ecx
jne 0x4023e1
push str.type
lea eax, [ebp + 0x24]
mov ecx, edi
call fcn.0040d329
push dword [eax]
mov esi, dword [sym.imp.MSVCRT.dll_atoi]
call esi
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0x24]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
pop ecx
je 0x4022b7
push eax
call fcn.004018e7
push str.port
lea eax, [ebp + 0x1c]
mov ecx, edi
call fcn.0040d329
push dword [eax]
call esi
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x1c]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
pop ecx
je 0x4022e2
push eax
call fcn.004018e7
push 0x410c9c
lea eax, [ebp + 0x20]
mov ecx, edi
call fcn.0040d329
push dword [eax]
or eax, 0xffffffff
lea ecx, [ebp + 0x3c]
call fcn.0040664f
mov eax, dword [eax]
pop ecx
lea esi, [ebx + 0x18]
call fcn.004065e5
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0x3c]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402320
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x20]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402334
push eax
call fcn.004018e7
push str.usename
lea eax, [ebp + 0x10]
mov ecx, edi
call fcn.0040d329
push dword [eax]
or eax, 0xffffffff
lea ecx, [ebp + 0x30]
call fcn.0040664f
mov eax, dword [eax]
pop ecx
lea esi, [ebx + 0x1c]
call fcn.004065e5
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 0x30]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402372
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402386
push eax
call fcn.004018e7
push str.password
lea eax, [ebp + 0x18]
mov ecx, edi
call fcn.0040d329
push dword [eax]
or eax, 0xffffffff
lea ecx, [ebp + 0x28]
call fcn.0040664f
mov eax, dword [eax]
pop ecx
lea esi, [ebx + 0x20]
call fcn.004065e5
mov dword [ebx + 0x14], eax
mov eax, dword [ebp + 0x28]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4023c4
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x18]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4025bb
push eax
call fcn.004018e7
jmp 0x4025bb
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push str.ttpack
push dword [ebp + 0x50]
call esi
test eax, eax
pop ecx
pop ecx
je 0x4025e8
push str.pack
push dword [ebp + 0x50]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x4025bb
mov esi, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x68]
lea esi, [esi + 0x4132c4]
and dword [esi - 0xc], eax
push 0x410c7c
lea eax, [ebp + 0x38]
call fcn.0040d329
mov edi, eax
mov eax, esi
call fcn.004065a2
mov eax, dword [ebp + 0x38]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402448
push eax
call fcn.004018e7
mov ecx, dword [ebp + 0x68]
push str.size
lea eax, [ebp + 0x34]
call fcn.0040d329
lea ecx, [esi - 4]
mov edi, eax
mov eax, ecx
call fcn.004065a2
mov eax, dword [ebp + 0x34]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402478
push eax
call fcn.004018e7
mov ecx, dword [ebp + 0x68]
push str.name
lea eax, [ebp + 0x2c]
call fcn.0040d329
lea ecx, [esi - 8]
mov edi, eax
mov eax, ecx
call fcn.004065a2
mov eax, dword [ebp + 0x2c]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4024a8
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x68]
call fcn.0040d217
xor edi, edi
jmp 0x4025a6
mov ecx, dword [ebp + 0x4c]
add ecx, 0x14
lea esi, [ebp + 0x64]
call fcn.004068ee
push str.source
push dword [ebp + 0x64]
call dword [sym.imp.MSVCRT.dll__mbscmp]
test eax, eax
pop ecx
pop ecx
jne 0x40258a
push 0x4c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
cmp esi, edi
pop ecx
je 0x40251e
mov ecx, dword [ebp + 0x4c]
or dword [ebp + 0x6c], 0xc
push 0x410c68
lea eax, [ebp + 0x40]
call fcn.0040d329
push dword [eax]
or eax, 0xffffffff
lea ecx, [ebp + 0x44]
call fcn.0040664f
mov eax, dword [eax]
pop ecx
push edi
push edi
push 1
push edi
push eax
call fcn.00408977
mov esi, eax
jmp 0x402520
xor esi, esi
test byte [ebp + 0x6c], 8
je 0x40253e
mov eax, dword [ebp + 0x44]
and dword [ebp + 0x6c], 0xfffffff7
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x40253e
push eax
call fcn.004018e7
test byte [ebp + 0x6c], 4
je 0x40255c
mov eax, dword [ebp + 0x40]
and dword [ebp + 0x6c], 0xfffffffb
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x40255c
push eax
call fcn.004018e7
cmp esi, edi
mov dword [ebp + 0x60], esi
je 0x402568
mov eax, dword [esi]
push esi
call dword [eax]
lea eax, [ebp + 0x60]
push eax
mov eax, dword [ebp + 0x48]
lea eax, [eax + 0x4132c8]
call fcn.00401478
cmp esi, edi
je 0x402584
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [ebp + 0x64]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x40259e
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x4c]
call fcn.0040d242
cmp eax, edi
mov dword [ebp + 0x4c], eax
jne 0x4024b7
inc dword [ebp + 0x54]
add dword [ebp + 0x48], 0x40
mov edi, dword [ebp + 0x68]
mov eax, dword [ebp + 0x50]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4025cf
push eax
call fcn.004018e7
mov eax, edi
call fcn.0040d242
mov edi, eax
test edi, edi
mov dword [ebp + 0x68], edi
jne 0x402263
jmp 0x402799
mov ecx, dword [ebp + 0x68]
xor ebx, ebx
push 0x410c7c
lea eax, [ebp + 0x60]
mov dword [0x4132b8], ebx
call fcn.0040d329
mov edi, eax
mov eax, 0x4132c4
call fcn.004065a2
mov eax, dword [ebp + 0x60]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402620
push eax
call fcn.004018e7
mov ecx, dword [ebp + 0x68]
push str.size
lea eax, [ebp + 0x60]
call fcn.0040d329
mov edi, eax
mov eax, 0x4132c0
call fcn.004065a2
mov eax, dword [ebp + 0x60]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402650
push eax
call fcn.004018e7
lea eax, [ebp + 0x60]
push ebx
push eax
mov eax, str.ttpsetup
call fcn.0040651e
pop ecx
mov edi, eax
pop ecx
mov eax, 0x4132bc
call fcn.004065a2
mov eax, dword [ebp + 0x60]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402681
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x68]
call fcn.0040d217
jmp 0x402774
lea ecx, [edi + 0x14]
lea esi, [ebp + 0x64]
call fcn.004068ee
push str.source
push dword [ebp + 0x64]
call dword [sym.imp.MSVCRT.dll__mbscmp]
test eax, eax
pop ecx
pop ecx
jne 0x402759
push 0x4c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
cmp esi, ebx
pop ecx
je 0x4026f1
or dword [ebp + 0x6c], 3
push 0x410c68
lea eax, [ebp + 0x40]
mov ecx, edi
call fcn.0040d329
push dword [eax]
or eax, 0xffffffff
lea ecx, [ebp + 0x60]
call fcn.0040664f
mov eax, dword [eax]
pop ecx
push ebx
push ebx
push 1
push ebx
push eax
call fcn.00408977
mov esi, eax
jmp 0x4026f3
xor esi, esi
test byte [ebp + 0x6c], 2
je 0x402711
mov eax, dword [ebp + 0x60]
and dword [ebp + 0x6c], 0xfffffffd
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x402711
push eax
call fcn.004018e7
test byte [ebp + 0x6c], 1
je 0x40272f
mov eax, dword [ebp + 0x40]
and dword [ebp + 0x6c], 0xfffffffe
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x40272f
push eax
call fcn.004018e7
cmp esi, ebx
mov dword [ebp + 0x44], esi
je 0x40273b
mov eax, dword [esi]
push esi
call dword [eax]
lea eax, [ebp + 0x44]
push eax
mov eax, 0x4132c8
call fcn.00401478
cmp esi, ebx
je 0x402753
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [ebp + 0x64]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x40276d
push eax
call fcn.004018e7
mov eax, edi
call fcn.0040d242
mov edi, eax
cmp edi, ebx
jne 0x40268e
mov eax, dword [ebp + 0x50]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
mov dword [ebp + 0x54], 1
je 0x402799
push eax
call fcn.004018e7
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x410760
call fcn.0040d1b3
mov eax, dword [ebp + 0x58]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4027bc
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x5c]
add eax, 0xfffffff4
cmp eax, dword [0x413054]
je 0x4027d0
push eax
call fcn.004018e7
mov eax, dword [ebp + 0x54]
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret