Function at 0x404320
Capabilities:
Check for time delay via gettickcount
Create directory
Get common file path
Get file size
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x49e1d0
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x4eed38]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4eed38]
xor eax, esp
push eax
lea eax, [esp + 0x290]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2a0]
mov ebx, dword [esp + 0x2a4]
mov esi, dword [esp + 0x2a8]
mov ebp, ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x1c], esi
call fcn.0045b40e
mov ecx, dword [eax + 4]
call fcn.00458dad
mov dword [esp + 0x298], 0
test esi, esi
jne 0x4043cc
push 1
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str._CBinPacket_Invalidate_params
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
mov dword [esp + 0x298], 0xffffffff
jmp 0x404e6b
or edi, 0xffffffff
cmp dword [ebp + 4], edi
je 0x404410
mov dword [esi], 0
mov ecx, dword [ebp + 4]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x68], eax
cmp eax, 0x84c
jae 0x40441c
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Bin_packets_size_is_too_small_maybe_it_has_been_destructed_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
mov dword [esp + 0x298], edi
jmp 0x404e6b
mov edx, dword [ebp + 4]
push edx
lea ecx, [esp + 0x54]
call fcn.0045c531
push 0x84c
xor esi, esi
push ebx
lea ecx, [esp + 0x58]
mov byte [esp + 0x2a0], 1
mov dword [esp + 0x40], esi
call fcn.0045c206
cmp dword [ebx + 0x844], 0xfffafffa
mov edi, eax
mov dword [esp + 0x44], esi
jne 0x4044b6
push 0x84a
push ebx
push esi
mov dword [esp + 0x50], 1
call fcn.0040a800
movzx eax, ax
add esp, 0xc
cmp ax, si
je 0x4044b6
push 1
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.CRC_Error__nPAC_file_may_be_damaged_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
lea ecx, [esp + 0x50]
mov byte [esp + 0x298], 0
call fcn.0045c6c9
mov dword [esp + 0x298], 0xffffffff
jmp 0x404e6b
lea esi, [ebx + 0x34]
push esi
lea ecx, [esp + 0x1c]
call fcn.00402530
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 0xc]
mov byte [esp + 0x298], 2
test eax, eax
jl 0x4044f0
push str.PAC_
push ecx
call fcn.00482831
add esp, 8
test eax, eax
je 0x4044f0
sub eax, dword [esp + 0x18]
sar eax, 1
je 0x40451f
push str.PAC_
push 0
lea ecx, [esp + 0x20]
call fcn.004033b0
mov eax, dword [esp + 0x18]
mov edx, esi
sub edx, eax
jmp 0x404510
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404510
cmp edi, 0x84c
jne 0x404e0a
mov ecx, str.BP_R1.0.0
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40455b
test dx, dx
je 0x404554
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40455b
add eax, 4
add ecx, 4
test dx, dx
jne 0x404532
xor eax, eax
or esi, 0xffffffff
jmp 0x404564
sbb eax, eax
mov esi, 0xffffffff
sbb eax, esi
test eax, eax
jne 0x404e0d
mov eax, dword [esp + 0x68]
cmp dword [ebx + 0x30], eax
je 0x4045a2
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Bin_packets_size_is_not_correct_maybe_it_has_been_destructed_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
lea ecx, [esp + 0x18]
call fcn.004014d0
jmp 0x404e53
cmp dword [ebx + 0x434], 0
jne 0x4045bd
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.There_is_no_files_in_packet_
jmp 0x404585
lea ecx, [esp + 0x20]
call fcn.00401650
lea ecx, [esp + 0x24]
call fcn.00401650
mov eax, dword [esp + 0x40]
mov byte [esp + 0x298], 4
test eax, eax
je 0x40466c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4045e6
sub eax, edx
sar eax, 1
cmp eax, 2
jb 0x40466c
mov ecx, dword [esp + 0x40]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00402530
push 0x5c
lea ecx, [esp + 0x2c]
mov byte [esp + 0x29c], 5
call fcn.004034d0
mov edi, dword [esp + 0x28]
lea esi, [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
push str._s_DownloadFiles_d
push esi
call fcn.00401ce0
add esp, 0x10
push 2
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x30]
call fcn.00401a60
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x29c], 6
call fcn.00401c20
lea ecx, [esp + 0x30]
call fcn.004014d0
lea ecx, [esp + 0x28]
jmp 0x404738
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x8e]
push ecx
mov word [esp + 0x90], ax
call fcn.00482280
add esp, 0xc
lea edx, [esp + 0x84]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x4046e1
push 1
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Can_not_get_temp_path_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
lea ecx, [esp + 0x24]
call fcn.004014d0
lea ecx, [esp + 0x20]
call fcn.004014d0
lea ecx, [esp + 0x18]
call fcn.004014d0
jmp 0x404e53
lea esi, [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [esp + 0x88]
push eax
push 0x4a9220
push esi
call fcn.00401ce0
add esp, 0x10
lea ecx, [esp + 0x84]
push ecx
lea ecx, [esp + 0x24]
call fcn.004021c0
push 2
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x28]
call fcn.00401a60
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x29c], 7
call fcn.00401c20
lea ecx, [esp + 0x30]
call fcn.004014d0
lea ecx, [esp + 0x2c]
call fcn.00401650
mov eax, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x30]
push str.Extract_PAC_file_failed__nThe_left_space_of___s__disk_maybe_not_enough_
push ecx
mov byte [esp + 0x2a4], 8
call fcn.00401ce0
add esp, 0xc
lea ecx, [esp + 0x6c]
call fcn.0045bc62
mov eax, dword [esi]
push 0
push eax
lea ecx, [esp + 0x74]
mov byte [esp + 0x2a0], 9
call fcn.0045bcfa
test eax, eax
je 0x404792
mov eax, dword [esi]
push eax
mov ecx, ebp
call fcn.004030d0
lea ecx, [esp + 0x6c]
call fcn.0045b847
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404847
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x404847
lea ecx, [esp + 0x38]
call fcn.00401650
mov esi, dword [esi]
push esi
lea edx, [esp + 0x3c]
push str.Can_not_create_directory__s_
push edx
mov byte [esp + 0x2a4], 0xa
call fcn.00401ce0
add esp, 0xc
push 1
push 0
push ecx
lea eax, [esp + 0x44]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00401680
mov ecx, 0x4f0110
call fcn.0040cea0
lea ecx, [esp + 0x38]
call fcn.004014d0
lea ecx, [esp + 0x6c]
mov byte [esp + 0x298], 8
call fcn.0045bc8b
lea ecx, [esp + 0x2c]
call fcn.004014d0
lea ecx, [esp + 0x24]
call fcn.004014d0
lea ecx, [esp + 0x20]
call fcn.004014d0
lea ecx, [esp + 0x18]
call fcn.004014d0
jmp 0x404495
mov esi, dword [esi]
push esi
lea ecx, [esp + 0x28]
push 0x4a9148
push ecx
call fcn.00401ce0
mov edi, dword [ebx + 0x434]
xor ecx, ecx
mov eax, edi
mov edx, 0xa14
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00451e0a
mov esi, eax
add esp, 0x10
mov dword [esp + 0x30], esi
mov byte [esp + 0x298], 0xb
test esi, esi
je 0x4048a5
push 0x402cd0
push edi
push 0xa14
push esi
call fcn.00401000
mov ebp, esi
mov dword [esp + 0x4c], esi
jmp 0x4048ab
xor ebp, ebp
mov dword [esp + 0x4c], ebp
xor esi, esi
mov byte [esp + 0x298], 9
cmp ebp, esi
jne 0x4048e5
push esi
call fcn.00451dff
add esp, 4
push 1
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str._CBinPaket_Out_of_memory_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
jmp 0x40480d
mov eax, dword [ebx + 0x434]
imul eax, eax, 0xa14
push eax
push esi
push ebp
call fcn.00482280
mov ecx, dword [ebx + 0x434]
imul ecx, ecx, 0xa14
add esp, 0xc
push ecx
push ebp
lea ecx, [esp + 0x58]
call fcn.0045c206
mov ecx, dword [ebx + 0x434]
imul ecx, ecx, 0xa14
cmp eax, ecx
je 0x40494f
push ebp
call fcn.00451dff
add esp, 4
push 1
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Read_pakcet_failed_maybe_it_has_been_destructed_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
jmp 0x40480d
cmp dword [esp + 0x44], esi
je 0x404967
push ecx
push ebp
push esi
call fcn.0040a800
movzx edx, ax
add esp, 0xc
mov dword [esp + 0x38], edx
mov ecx, dword [esp + 0x3c]
push 0x64
push esi
push 0x809
mov dword [esp + 0x4c], esi
call fcn.00402de0
cmp dword [ebx + 0x434], esi
mov dword [esp + 0x48], esi
jle 0x404c28
lea eax, [ebp + 0x604]
mov dword [esp + 0x28], eax
call fcn.0045b40e
mov ecx, dword [eax + 4]
call fcn.00458dd7
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
cmp eax, 0xffffffff
je 0x404cf4
cmp eax, dword [esp + 0x68]
jae 0x404cf4
test eax, eax
je 0x404c0b
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x38]
call fcn.00401680
mov ebp, dword [esp + 0x28]
add ebp, 0xfffffc00
push ebp
lea ecx, [esp + 0x38]
mov byte [esp + 0x29c], 0xc
call fcn.004024f0
mov edi, dword [esp + 0x34]
push 0
push edi
lea ecx, [esp + 0x74]
mov esi, 1
call fcn.0045bcfa
test eax, eax
je 0x404a35
mov eax, dword [esp + 0x24]
push esi
push ebp
push eax
lea ecx, [esp + 0x40]
push str._s_s__d_
push ecx
call fcn.00401ce0
mov edi, dword [esp + 0x48]
add esp, 0x14
push 0
push edi
lea ecx, [esp + 0x74]
inc esi
call fcn.0045bcfa
test eax, eax
jne 0x404a07
mov ebp, dword [esp + 0x28]
push 0x200
lea esi, [ebp - 0x400]
push 0
push esi
call fcn.00482280
mov edx, esi
add esp, 0xc
mov eax, edi
sub edx, edi
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
test cx, cx
jne 0x404a55
mov edx, dword [ebx + 0x434]
dec edx
cmp dword [esp + 0x48], edx
jne 0x404a82
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
add ecx, 0x14
push eax
call fcn.00401c20
lea eax, [ebp - 0x600]
lea edx, [eax + 2]
jmp 0x404a90
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404a90
sub eax, edx
sar eax, 1
jne 0x404aa5
inc dword [esp + 0x40]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
push edi
mov dword [esp + 0x80], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404c91
mov ecx, dword [esp + 0x28]
mov ebp, dword [ecx]
mov edi, 0xa00000
push edi
call fcn.00451e0a
add esp, 4
mov esi, eax
mov dword [esp + 0x30], 0
test ebp, ebp
jbe 0x404be2
lea ebx, [ebx]
call fcn.0045b40e
mov ecx, dword [eax + 4]
call fcn.00458dd7
lea ecx, [esp + 0x50]
call fcn.0045c2e8
push 0
push 0x64
push edx
push eax
call fcn.004835e0
xor ecx, ecx
push ecx
mov ecx, dword [esp + 0x6c]
push ecx
push edx
push eax
call fcn.00483570
mov ecx, dword [esp + 0x3c]
push eax
push 1
push 0x809
call fcn.00402de0
push 0xa00000
push 0
push esi
call fcn.00482280
add esp, 0xc
cmp ebp, 0xa00000
jae 0x404b5b
mov edi, ebp
push edi
push esi
lea ecx, [esp + 0x58]
call fcn.0045c206
cmp dword [esp + 0x44], 0
je 0x404b83
mov edx, dword [esp + 0x38]
push edi
push esi
push edx
call fcn.0040a800
movzx eax, ax
add esp, 0xc
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x60]
mov edx, dword [ecx + 0x434]
dec edx
cmp dword [esp + 0x48], edx
jne 0x404ba8
cmp edi, ebp
jne 0x404ba8
cmp byte [esi + edi - 1], 0
jne 0x404ba8
dec edi
mov dword [esp + 0x30], 1
push 0
lea eax, [esp + 0x68]
push eax
push edi
push esi
push ebx
mov dword [esp + 0x78], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404cd8
cmp dword [esp + 0x64], edi
jne 0x404cd8
cmp dword [esp + 0x30], 0
je 0x404bda
inc edi
sub ebp, edi
jne 0x404b00
push esi
call fcn.00451dff
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x34]
mov byte [esp + 0x298], 9
call fcn.004014d0
mov ebp, dword [esp + 0x4c]
mov ebx, dword [esp + 0x60]
mov eax, dword [esp + 0x48]
add dword [esp + 0x28], 0xa14
inc eax
cmp eax, dword [ebx + 0x434]
mov dword [esp + 0x48], eax
jl 0x404996
mov ecx, dword [esp + 0x3c]
push 0x64
push 2
push 0x809
call fcn.00402de0
mov eax, dword [esp + 0x40]
sub dword [ebx + 0x434], eax
mov edi, dword [ebx + 0x434]
xor ecx, ecx
mov eax, edi
mov edx, 0xa14
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00451e0a
mov esi, eax
add esp, 4
mov dword [esp + 0x60], esi
mov byte [esp + 0x298], 0xd
test esi, esi
je 0x404d33
push 0x402cd0
push edi
push 0xa14
push esi
call fcn.00401000
jmp 0x404d35
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.00451dff
add esp, 4
push 1
push 0
push ecx
lea edx, [esp + 0x38]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00401680
mov ecx, 0x4f0110
call fcn.0040cea0
mov ecx, dword [esp + 0x3c]
push 0
push 2
push 0x809
call fcn.00402de0
lea ecx, [esp + 0x34]
jmp 0x404808
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x4c]
push eax
call fcn.00451dff
push esi
call fcn.00451dff
add esp, 8
jmp 0x404c9e
push ebp
call fcn.00451dff
add esp, 4
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Read_pakcet_failed_maybe_it_has_been_destructed_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
mov ecx, dword [esp + 0x3c]
push 0
push 2
push 0x809
call fcn.00402de0
jmp 0x40480d
xor esi, esi
mov eax, dword [esp + 0x1c]
mov dword [eax], esi
mov ecx, dword [ebx + 0x434]
imul ecx, ecx, 0xa14
push ecx
push ebp
push esi
mov byte [esp + 0x2a4], 9
call fcn.00483200
push ebp
call fcn.00451dff
add esp, 0x10
cmp dword [esp + 0x44], 0
je 0x404da9
mov edx, dword [esp + 0x38]
push 2
add ebx, 0x84a
push ebx
push edx
call fcn.0040a800
movzx eax, ax
add esp, 0xc
test ax, ax
je 0x404da9
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.CRC_Error__nPAC_file_may_be_damaged_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
jmp 0x40480d
lea ecx, [esp + 0x6c]
mov byte [esp + 0x298], 8
call fcn.0045bc8b
lea ecx, [esp + 0x2c]
call fcn.004014d0
lea ecx, [esp + 0x24]
call fcn.004014d0
lea ecx, [esp + 0x20]
call fcn.004014d0
lea ecx, [esp + 0x18]
call fcn.004014d0
lea ecx, [esp + 0x50]
mov byte [esp + 0x298], 0
call fcn.0045c6c9
lea ecx, [esp + 0x17]
mov dword [esp + 0x298], 0xffffffff
call fcn.00403520
mov eax, 1
jmp 0x404e76
or esi, 0xffffffff
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Bin_packet_version_is_not_support_
call fcn.00402530
mov ecx, 0x4f0110
call fcn.0040cea0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x298], 1
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404e53
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x50]
mov byte [esp + 0x298], 0
call fcn.0045c6c9
mov dword [esp + 0x298], esi
lea ecx, [esp + 0x17]
call fcn.00403520
xor eax, eax
mov ecx, dword [esp + 0x290]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.004820da
add esp, 0x288
ret 0xc