Function at 0x541b90
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bc544
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x5f8800]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
movq qword [esi + 0x18d8a5], xmm0
mov word [esi + 0x18d8ad], 0
mov byte [esi + 0x18d8af], 0
movups xmmword [esi + 0x18d8b0], xmm0
mov dword [ebp - 0xe0], eax
movups xmmword [esi + 0x18d8c0], xmm0
mov ecx, dword [esi + 0x1842ec]
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov word [esi + 0x18bf74], 0
call fcn.00569770
lea eax, [esi + 0x189336]
mov ecx, 0x32
or edx, 0xffffffff
nop
mov word [eax - 2], dx
lea eax, [eax + 0xc]
mov word [eax - 0xc], dx
mov word [eax - 0xa], dx
mov dword [eax - 6], 0
sub ecx, 1
jne 0x541c20
push 7
mov ecx, esi
call fcn.00415190
push 0xb
mov ecx, esi
call fcn.00415190
push 0xd
mov ecx, esi
call fcn.00415190
push 0xe
mov ecx, esi
call fcn.00415190
push 0x10
mov ecx, esi
call fcn.00415190
push 0x16
mov ecx, esi
call fcn.00415190
push 0x14
mov ecx, esi
call fcn.00415190
push 0x15
mov ecx, esi
call fcn.00415190
push 0x17
mov ecx, esi
call fcn.00415190
push 0x2e
mov ecx, esi
call fcn.00415190
push 0x32
mov ecx, esi
call fcn.00415190
push 0x38
mov ecx, esi
call fcn.00415190
cmp byte [esi + 0x18963c], 0
je 0x541cc3
cmp word [esi + 0x14568c], 0x14
jne 0x541cc3
push 0x3d
mov ecx, esi
call fcn.00415190
push 0
push 0
push 0
push 0
push 9
mov ecx, esi
call fcn.00446a80
mov ecx, dword [esi + 0x13c684]
xor eax, eax
mov byte [esi + 0x18d8d2], 0
mov byte [esi + 0x18dacc], 0
mov byte [esi + 0x1895f8], 0
mov dword [esi + 0x18c038], 0xffffffff
mov byte [esi + 0x189645], 0
mov dword [esi + 0x18c064], 0
mov word [esi + 0x18dabc], ax
mov byte [esi + 0x18bf6d], al
mov word [esi + 0x189661], ax
mov word [esi + 0x189658], ax
mov byte [esi + 0x189657], al
mov byte [esi + 0x189663], al
mov byte [esi + 0x18d64b], 0xff
mov dword [esi + 0x189318], eax
test ecx, ecx
je 0x541d6b
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x541d51
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [esi + 0x13c684]
test ecx, ecx
je 0x541d61
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esi + 0x13c684], 0
mov dword [esi + 0x13c688], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
push 0x32
mov dword [esi + 0x13c68c], eax
lea eax, [esi + 0x13c642]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, 0x258
lea edi, [esi + 0x184c2c]
add esp, 0xc
mov dword [ebp - 0xe4], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x541db7
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0xe4]
mov dword [edi], 0
add edi, 4
sub eax, 1
mov dword [ebp - 0xe4], eax
jne 0x541da5
lea eax, [esi + 0x147126]
mov ecx, 0x258
xor edx, edx
lea eax, [eax + 6]
mov dword [eax - 8], edx
mov byte [eax - 4], dl
sub ecx, 1
jne 0x541dd6
lea eax, [esi + 0x148668]
lea ecx, [edx + 0x64]
nop
mov dword [eax - 4], edx
xorps xmm0, xmm0
mov dword [eax], 0xffffffff
lea eax, [eax + 0x2c]
movq qword [eax - 0x28], xmm0
mov dword [eax - 0x20], edx
movups xmmword [eax - 0x1c], xmm0
movq qword [eax - 0xc], xmm0
sub ecx, 1
jne 0x541df0
lea eax, [esi + 0x1499c6]
mov ecx, 0x64
xor edx, edx
lea eax, [eax + 0xc]
mov dword [eax - 0xe], edx
mov byte [eax - 0xa], dl
mov dword [eax - 6], edx
sub ecx, 1
jne 0x541e20
mov eax, 0x1f4
lea edi, [esi + 0x184308]
mov dword [ebp - 0xe4], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x541e56
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0xe4]
mov dword [edi], 0
add edi, 4
sub eax, 1
mov dword [ebp - 0xe4], eax
jne 0x541e44
mov edi, dword [ebp - 0xe0]
mov ecx, edi
call fcn.005766b0
mov ecx, edi
mov word [esi + 0x18c134], ax
call fcn.005766b0
mov dword [ebp - 0xf4], eax
mov ecx, edi
movzx eax, ax
mov dword [ebp - 0xec], eax
call fcn.005766b0
mov dword [ebp - 0xe4], eax
mov ecx, edi
movzx eax, ax
mov dword [ebp - 0xe8], eax
call fcn.005766b0
mov ecx, edi
mov word [esi + 0x18c136], ax
call fcn.005766b0
mov ecx, edi
mov word [esi + 0x18c138], ax
call fcn.005766b0
mov ecx, edi
mov word [esi + 0x18c13a], ax
call fcn.005766b0
mov ecx, edi
mov word [esi + 0x18c13c], ax
call fcn.005766b0
mov ecx, edi
mov word [esi + 0x18c13e], ax
call fcn.005765b0
mov ecx, edi
mov dword [esi + 0x18bfdc], eax
call fcn.005765b0
push 4
push dword [esi + 0x18c140]
mov dword [esi + 0x18bfe0], eax
call fcn.005aa4e8
push 4
call fcn.005aa520
add esp, 0xc
mov dword [ebp - 0xf0], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x541f43
mov ecx, edi
call fcn.005765b0
mov ecx, dword [ebp - 0xf0]
mov dword [ecx], eax
jmp 0x541f45
xor ecx, ecx
push 4
push dword [esi + 0x18c144]
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x18c140], ecx
call fcn.005aa4e8
push 4
call fcn.005aa520
add esp, 0xc
mov dword [ebp - 0xf0], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x541f8b
mov ecx, edi
call fcn.005765b0
mov ecx, dword [ebp - 0xf0]
mov dword [ecx], eax
jmp 0x541f8d
xor ecx, ecx
push 0xa
mov dword [esi + 0x18c144], ecx
lea edi, [esi + 0x18d8a5]
mov ecx, dword [ebp - 0xe0]
push edi
mov dword [ebp - 4], 0xffffffff
call fcn.00573e00
lea eax, [esi + 0x18d8b0]
push eax
push edi
call fcn.005666c0
mov byte [esi + 0x18d8d0], al
lea eax, [esi + 0x18d87a]
push eax
lea eax, [ebp - 0x28]
push 0xc
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
mov ecx, dword [ebp - 0xe0]
lea eax, [esi + 0x18d87a]
add esp, 0x14
xorps xmm0, xmm0
movq qword [eax], xmm0
mov word [eax + 8], 0
mov byte [eax + 0xa], 0
push 0xa
push eax
call fcn.00573e00
mov ecx, dword [ebp - 0xe0]
call fcn.00576520
mov ecx, dword [ebp - 0xe0]
mov byte [0x6a4c20], al
call fcn.00576520
push dword [esi + 0x13f198]
mov ecx, dword [ebp - 0xe0]
mov byte [esi + 0x18daba], al
call fcn.00574260
mov ecx, dword [ebp - 0xe0]
call fcn.005765b0
mov ecx, dword [ebp - 0xe0]
mov dword [esi + 0x18c01c], eax
call fcn.005764a0
mov ecx, dword [ebp - 0xe0]
mov byte [esi + 0x18965c], al
call fcn.005765b0
mov ecx, dword [ebp - 0xe0]
mov dword [esi + 0x18bfe4], eax
call fcn.00576520
mov ecx, dword [ebp - 0xe0]
mov byte [esi + 0x194b48], al
call fcn.00576520
mov byte [esi + 0x18dace], al
mov ecx, esi
mov al, byte [esi + 0x18daba]
test al, al
push eax
setne al
movzx eax, al
push eax
call fcn.00462940
mov ecx, dword [ebp - 0xe0]
call fcn.005764a0
test al, al
je 0x5420bf
mov edi, dword [ebp - 0xe0]
mov ecx, dword [esi + 0x1842ec]
push edi
call fcn.00569a60
jmp 0x542179
push str.mapdata_
xorps xmm0, xmm0
lea eax, [ebp - 0x48]
push 0x20
push eax
movups xmmword [ebp - 0x48], xmm0
movups xmmword [ebp - 0x38], xmm0
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
add esp, 0xc
cmp dword [edi], 0x6e657261
jne 0x5420f2
cmp byte [edi + 4], 0x61
jne 0x5420f2
mov eax, str.arena
jmp 0x542145
cmp dword [edi], 0x6f686761
jne 0x54210f
cmp word [edi + 4], 0x7375
jne 0x54210f
cmp byte [edi + 6], 0x65
jne 0x54210f
mov eax, str.aghouse
jmp 0x542145
cmp dword [edi], 0x6f686765
jne 0x54212c
cmp word [edi + 4], 0x7375
jne 0x54212c
cmp byte [edi + 6], 0x65
jne 0x54212c
mov eax, str.eghouse
jmp 0x542145
cmp dword [edi], 0x72617473
jne 0x54213f
cmp byte [edi + 4], 0x61
mov eax, str.stara
je 0x542145
lea eax, [esi + 0x18d8a5]
push eax
lea eax, [ebp - 0x48]
push 0x20
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
push str..nmd
lea eax, [ebp - 0x48]
push 0x20
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
mov ecx, dword [esi + 0x1842ec]
lea eax, [ebp - 0x48]
add esp, 0x18
push eax
call fcn.00569860
mov edi, dword [ebp - 0xe0]
mov eax, dword [esi + 0x1842ec]
mov ecx, dword [ebp - 0xec]
mov edx, dword [ebp - 0xe8]
mov word [eax + 0x670a44], cx
mov eax, dword [esi + 0x1842ec]
mov word [eax + 0x670a46], dx
lea eax, [ecx + 0x13]
cmp byte [esi + 0x18965c], 0
mov word [esi + 0x18c130], ax
lea eax, [edx + 0x11]
mov word [esi + 0x18c132], ax
mov byte [esi + 0x18d785], 5
jne 0x542267
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [esi + 0x18d77a]
mov ecx, esi
push eax
call fcn.00565e40
movd xmm1, dword [esi + 0x18bfe4]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
mulsd xmm1, qword [0x5cd5b8]
cvttsd2si eax, xmm1
movzx eax, ax
push eax
mov eax, dword [esi + 0x18c144]
push dword [eax]
mov eax, dword [esi + 0x18c140]
push dword [eax]
movzx eax, word [esi + 0x18c13e]
push dword [esi + 0x18bfe0]
push dword [esi + 0x18bfdc]
push eax
movzx eax, word [esi + 0x18c13c]
push eax
movzx eax, word [esi + 0x18c13a]
push eax
movzx eax, word [esi + 0x18c138]
push eax
movsx eax, word [esi + 0x18c136]
push 5
push eax
mov eax, dword [ebp - 0xe8]
lea eax, [eax + 0x11]
cwde
push eax
mov eax, dword [ebp - 0xec]
lea eax, [eax + 0x13]
cwde
push eax
jmp 0x5422d2
cmp byte [esi + 0x18963d], 0
jne 0x542281
push 0
push 0
push 0
push 0
push 0x3e
mov ecx, esi
call fcn.00446a80
mov ax, word [esi + 0x18d782]
xorps xmm0, xmm0
push 0
push 0
push 0
push 0
push 0
push 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
movq qword [ebp - 0x1c], xmm0
movq xmm0, qword [esi + 0x18d77a]
push 0xffffffffffffffff
movq qword [ebp - 0x1c], xmm0
push 0xffffffffffffffff
mov dx, word [esi + 0x18c134]
mov ecx, dword [esi + 0x1842ec]
call fcn.0056b450
mov ecx, dword [0x5f9de8]
call fcn.0057c5b0
cmp ax, 1
jne 0x542342
mov eax, dword [ebp - 0xf4]
add eax, 9
shl eax, 5
mov word [esi + 0x18c176], ax
mov word [esi + 0x18c172], ax
mov eax, dword [ebp - 0xe4]
add eax, 0xa
shl eax, 5
mov word [esi + 0x18c178], ax
mov word [esi + 0x18c174], ax
mov eax, dword [ebp - 0xe8]
add eax, 0xa
push edi
push eax
mov eax, dword [ebp - 0xec]
add eax, 9
jmp 0x5423fa
mov ecx, dword [0x5f9de8]
call fcn.0057c5b0
cmp ax, 2
jne 0x5423a1
mov eax, dword [ebp - 0xf4]
shl eax, 5
add eax, 0xd0
mov word [esi + 0x18c176], ax
mov word [esi + 0x18c172], ax
mov eax, dword [ebp - 0xe4]
shl eax, 5
add eax, 0xf0
mov word [esi + 0x18c178], ax
mov word [esi + 0x18c174], ax
mov eax, dword [ebp - 0xe8]
add eax, 8
push edi
push eax
mov eax, dword [ebp - 0xec]
add eax, 7
jmp 0x5423fa
mov ecx, dword [0x5f9de8]
call fcn.0057c5b0
cmp ax, 3
jne 0x542402
mov eax, dword [ebp - 0xf4]
add eax, 3
shl eax, 5
mov word [esi + 0x18c176], ax
mov word [esi + 0x18c172], ax
mov eax, dword [ebp - 0xe4]
add eax, 4
shl eax, 5
mov word [esi + 0x18c178], ax
mov word [esi + 0x18c174], ax
mov eax, dword [ebp - 0xe8]
add eax, 6
push edi
push eax
mov eax, dword [ebp - 0xec]
add eax, 3
push eax
mov ecx, esi
call fcn.004819d0
mov ecx, esi
call fcn.0045ea10
xorps xmm0, xmm0
mov byte [esi + 0x189664], 1
push 0x20
movups xmmword [ebp - 0xdc], xmm0
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xc8], 0
call fcn.005aa520
movups xmm0, xmmword [str.INITDATA_RESPONSE_HANDLER1]
mov dword [ebp - 0xdc], eax
add esp, 4
mov dword [ebp - 0xcc], 0x1a
mov dword [ebp - 0xc8], 0x1f
movups xmmword [eax], xmm0
movq xmm0, qword [0x5d4988]
movq qword [eax + 0x10], xmm0
mov cx, word [0x5d4990]
mov word [eax + 0x18], cx
mov byte [eax + 0x1a], 0
lea eax, [ebp - 0xdc]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0xfc]
mov ecx, 0x5fd3c4
push eax
call fcn.0040e380
mov eax, dword [eax]
add eax, 0x20
cmp dword [eax + 0x14], 0xf
jbe 0x5424a4
mov eax, dword [eax]
lea ecx, [esi + 0x18d8b0]
push ecx
push eax
lea eax, [ebp - 0xc0]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [ebp - 0xc8]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
cmp ecx, 0xf
jbe 0x5424fd
mov edx, dword [ebp - 0xdc]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x5424f3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x542812
push ecx
push edx
call fcn.005aa4e8
add esp, 8
push 1
push 0xa
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xcc], 0
push eax
mov ecx, esi
mov dword [ebp - 0xc8], 0xf
mov byte [ebp - 0xdc], 0
call fcn.00412660
cmp byte [esi + 0x18d8d0], 0
jge 0x542546
or eax, 0xffffffff
mov word [esi + 0x140d36], ax
mov word [esi + 0x140d38], ax
jmp 0x542574
mov dword [esi + 0x140d36], 0x800080
mov ecx, 0x80
mov eax, dword [esi + 0x1842ec]
cmp cx, word [eax + 0x670a3c]
jg 0x54256d
cmp cx, word [eax + 0x670a3e]
jle 0x542574
mov byte [esi + 0x18bf94], 0
mov ecx, dword [0x5f9de8]
call fcn.0057c5b0
cmp ax, 1
jne 0x542591
mov dword [esi + 0x140906], 0x820096
jmp 0x5425c9
mov ecx, dword [0x5f9de8]
call fcn.0057c5b0
cmp ax, 2
jne 0x5425ae
mov dword [esi + 0x140906], 0xbe00f0
jmp 0x5425c9
mov ecx, dword [0x5f9de8]
call fcn.0057c5b0
cmp ax, 3
jne 0x5425c9
mov dword [esi + 0x140906], 0xc80154
cmp byte [esi + 0x189660], 0
je 0x542632
cmp dword [esi + 0x18d87a], 0x6464696d
lea ecx, [esi + 0x18d87a]
jne 0x5425f5
cmp dword [ecx + 4], 0x616c656c
jne 0x5425f5
cmp word [ecx + 8], 0x646e
je 0x54261a
cmp dword [ecx], 0x766c6764
jne 0x542603
cmp byte [ecx + 4], 0x32
je 0x54261a
cmp dword [ecx], 0x6464696d
jne 0x542632
cmp dword [ecx + 4], 0x3164656c
jne 0x542632
cmp byte [ecx + 8], 0x6e
jne 0x542632
push 0
push 0
push 0
push 0
push 6
mov ecx, esi
call fcn.00446a80
mov byte [esi + 0x189660], 0
push 4
mov ecx, esi
call fcn.00412c00
mov ecx, dword [esi + 0x14a8e0]
call fcn.00407570
mov eax, 0xf000
test word [esi + 0x18c13a], ax
setne al
mov byte [esi + 0x189655], al
cmp byte [esi + 0x18965f], 0
je 0x5426c5
push 0
push 0
push 3
push 0
push 0
push closesocket
push str.contentscontents1000.txt
mov byte [esi + 0x18965f], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x542690
xor eax, eax
jmp 0x5426ac
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [ebp - 0xf0], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xf0]
push 0
push 0
push 0
push 0
push eax
push 0
push 0
push 0x220b2f00
mov ecx, esi
call fcn.00493690
cmp byte [esi + 0x18bf95], 0
je 0x5426f9
push 0
push str._showservertime
push 0
push 0
push 0
push 0
push 0
push 0x3203204
mov ecx, esi
mov byte [esi + 0x18bf95], 0
call fcn.00493690
mov byte [esi + 0x18bf95], 1
cmp dword [esi + 0x13f194], 0
jne 0x5427f5
mov eax, dword [esi + 0x13f198]
cmp byte [eax + 0xd], 0
je 0x5427f5
movsx eax, word [esi + 0x18c134]
lea ecx, [esi + 0x18dabe]
mov dword [esi + 0x18c064], eax
xorps xmm0, xmm0
lea eax, [esi + 0x18d77a]
movq qword [ecx], xmm0
push eax
push 0xb
push ecx
mov dword [ecx + 8], 0
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
movzx eax, word [esi + 0x18c136]
add esp, 0xc
mov word [esi + 0x18dabc], ax
mov ecx, esi
movzx eax, word [esi + 0x18c138]
mov word [esi + 0x18c15e], ax
movzx eax, word [esi + 0x18c13a]
mov word [esi + 0x18c160], ax
movzx eax, word [esi + 0x18c13c]
mov word [esi + 0x18c162], ax
movzx eax, word [esi + 0x18c13e]
mov word [esi + 0x18c164], ax
mov eax, dword [esi + 0x18bfdc]
mov dword [esi + 0x18c068], eax
mov eax, dword [esi + 0x18bfe0]
mov dword [esi + 0x18c06c], eax
call fcn.00565e40
movd xmm1, dword [esi + 0x18bfe4]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
mulsd xmm1, qword [0x5cd5b8]
cvttsd2si eax, xmm1
mov word [esi + 0x18c170], ax
mov eax, dword [esi + 0x18c140]
mov eax, dword [eax]
mov dword [esi + 0x18c168], eax
mov eax, dword [esi + 0x18c144]
mov eax, dword [eax]
mov dword [esi + 0x18c16c], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005aa550
mov esp, ebp
pop ebp
ret 4
call fcn.005ac169
int3