Function at 0x402a50
Capabilities:
Copy file
Delete file
Download and write a file
Download url
Get file size
Get graphical window text
Move file
Read file on windows
Receive and write data from server to client
Receive data
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42920a
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x26ac
call fcn.0041fd20
mov eax, dword [0x4362ac]
xor eax, esp
mov dword [esp + 0x26a8], eax
push ebx
push esi
push edi
mov eax, dword [0x4362ac]
xor eax, esp
push eax
lea eax, [esp + 0x26c0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
push 0x103
lea ecx, [esp + 0x299]
push ebx
push ecx
mov dword [esp + 0x50], eax
mov byte [esp + 0x2a0], bl
call fcn.0041a930
push 0x103
lea edx, [esp + 0x4b5]
push ebx
push edx
mov byte [esp + 0x4bc], bl
call fcn.0041a930
push 0x103
lea eax, [esp + 0x5c9]
push ebx
push eax
mov byte [esp + 0x5d0], bl
call fcn.0041a930
push 0x103
lea ecx, [esp + 0x3c5]
push ebx
push ecx
mov byte [esp + 0x3cc], bl
call fcn.0041a930
mov esi, 0xf
add esp, 0x30
mov dword [esp + 0xe0], esi
mov dword [esp + 0xdc], ebx
mov byte [esp + 0xcc], bl
mov dword [esp + 0x26c8], ebx
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
mov byte [esp + 0x26c8], 1
push 0x12
push str.SOFTWAREBCServer
lea ecx, [esp + 0x60]
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
call fcn.00405320
mov eax, dword [esp + 0x5c]
mov edi, 0x10
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x70], edi
jae 0x402b82
lea eax, [esp + 0x5c]
lea edx, [esp + 0x10]
push edx
push 0x20019
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov byte [esp + 0x26c8], 2
cmp dword [esp + 0x70], edi
jb 0x402bb4
mov eax, dword [esp + 0x5c]
push eax
call fcn.00416928
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x10], ebx
je 0x4036ad
push 8
push str.PatchVer
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.00405320
lea eax, [esp + 0x10]
push eax
lea ebx, [esp + 0xcc]
lea ecx, [esp + 0x28]
mov byte [esp + 0x26cc], 3
call fcn.004010c0
mov byte [esp + 0x26c8], 2
cmp dword [esp + 0x3c], edi
jb 0x402c1e
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00416928
add esp, 4
xor eax, eax
push 8
push str.PatchURL
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], eax
mov byte [esp + 0x30], al
call fcn.00405320
lea edx, [esp + 0x10]
push edx
lea ebx, [esp + 0x94]
lea ecx, [esp + 0x28]
mov byte [esp + 0x26cc], 4
call fcn.004010c0
mov byte [esp + 0x26c8], 2
cmp dword [esp + 0x3c], edi
jb 0x402c74
mov eax, dword [esp + 0x28]
push eax
call fcn.00416928
add esp, 4
xor ebx, ebx
cmp dword [esp + 0xdc], ebx
je 0x40369a
cmp dword [esp + 0xa4], ebx
je 0x40369a
lea ecx, [esp + 0xc8]
push ecx
mov ecx, str._verid
lea edi, [esp + 0x78]
call fcn.00404840
push eax
mov edi, str.page
lea esi, [esp + 0x2c]
mov byte [esp + 0x26d0], 5
call fcn.004048f0
add esp, 8
push ebx
push eax
or eax, 0xffffffff
lea esi, [esp + 0x98]
mov byte [esp + 0x26d0], 6
call fcn.00404540
mov esi, 0x10
cmp dword [esp + 0x3c], esi
jb 0x402cf1
mov edx, dword [esp + 0x28]
push edx
call fcn.00416928
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
cmp dword [esp + 0x8c], esi
jb 0x402d17
mov eax, dword [esp + 0x78]
push eax
call fcn.00416928
add esp, 4
mov ecx, dword [esp + 0xa4]
mov eax, dword [esp + 0x94]
mov dword [esp + 0x48], ecx
cmp dword [esp + 0xa8], esi
jae 0x402d39
lea eax, [esp + 0x94]
mov esi, eax
jmp 0x402d40
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402d40
lea edi, [esp + 0x5ac]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x402d51
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x134], 0xf
mov dword [esp + 0x130], ebx
mov byte [esp + 0x120], bl
push str.MapFile
lea ecx, [esp + 0x28]
mov byte [esp + 0x26cc], 7
call fcn.004052e0
lea edx, [esp + 0x10]
push edx
lea ebx, [esp + 0x120]
lea ecx, [esp + 0x28]
mov byte [esp + 0x26cc], 8
call fcn.004010c0
mov byte [esp + 0x26c8], 7
cmp dword [esp + 0x3c], 0x10
jb 0x402dcf
mov eax, dword [esp + 0x28]
push eax
call fcn.00416928
add esp, 4
push 7
push str._server
lea ecx, [esp + 0x124]
push ecx
xor eax, eax
call fcn.00404190
cmp eax, 0xffffffff
je 0x402e01
mov edx, dword [esp + 0x130]
sub edx, eax
push edx
push eax
lea ecx, [esp + 0x124]
call fcn.00405430
lea eax, [esp + 0x11c]
push eax
mov edi, str._serverpatch
lea esi, [esp + 0x28]
call fcn.004048f0
push eax
mov edi, 0x42c734
lea esi, [esp + 0x108]
mov byte [esp + 0x26d0], 9
call fcn.004048f0
add esp, 8
mov ebx, 0x10
mov byte [esp + 0x26c8], 0xb
cmp dword [esp + 0x3c], ebx
jb 0x402e54
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00416928
add esp, 4
lea ecx, [esp + 0x100]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
call fcn.00404060
mov edx, dword [esp + 0x114]
mov eax, dword [esp + 0x104]
mov dword [esp + 0x54], edx
cmp dword [esp + 0x118], ebx
jae 0x402e97
lea eax, [esp + 0x104]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ea0
lea edi, [esp + 0x294]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402eb1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x100]
push eax
mov edi, str.update_.tmp
lea esi, [esp + 0x13c]
call fcn.004048f0
add esp, 4
mov byte [esp + 0x26c8], 0xc
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x1c], 0
cmp dword [esp + 0x150], ebx
jae 0x402f0c
lea eax, [esp + 0x13c]
lea ecx, [esp + 0x154]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402fae
lea eax, [esp + 0x294]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402f30
mov edx, dword [str.update_0.tmp]
mov ecx, dword [0x42c75c]
mov dword [eax], edx
mov edx, dword [0x42c760]
mov dword [eax + 4], ecx
mov cl, byte [0x42c764]
mov dword [eax + 8], edx
push 0xa
lea edx, [esp + 0x3a0]
push edx
push 0
mov byte [eax + 0xc], cl
mov dword [esp + 0x28], 0
call fcn.0041702f
lea eax, [esp + 0x3a8]
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402f80
lea edi, [esp + 0x5ac]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402f93
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x403070
lea eax, [esp + 0x180]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402fb7
lea edi, [esp + 0x294]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402fc8
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x180]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004170b0
push str..tmp
mov esi, eax
call fcn.004170b0
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + esi + 0x18c]
sub ecx, eax
lea eax, [esp + 0x18c]
push str.update__d
push eax
mov byte [ecx], 0
call fcn.00416dcc
mov edx, dword [esp + 0x30]
push 0xa
lea ecx, [esp + 0x3b4]
push ecx
push edx
call fcn.0041702f
lea eax, [esp + 0x3bc]
add esp, 0x20
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403040
lea edi, [esp + 0x5ac]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403053
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x44]
mov ecx, dword [esi + 0x38]
mov eax, 0x10624dd3
imul ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jg 0x403092
mov eax, 1
mov ecx, dword [esi + 0x24]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
inc eax
movzx eax, ax
shl eax, 0x10
push eax
xor ebx, ebx
push ebx
push 0x401
push ecx
call edi
mov edx, dword [esi + 0x24]
push ebx
push 1
push 0x404
push edx
call edi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x24]
push ebx
push eax
push 0x402
push ecx
call edi
push 0x1fff
lea edx, [esp + 0x6b9]
push ebx
push edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x6c0], bl
call fcn.0041a930
push str.update_
call fcn.004170b0
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x110]
push eax
mov edi, str.chunk.tmp
lea esi, [esp + 0xc0]
call fcn.004048f0
add esp, 0x14
lea eax, [esp + 0x294]
mov byte [esp + 0x26c8], 0xd
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403130
lea edi, [esp + 0x4a4]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403143
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0xb0]
mov edi, 0x10
cmp dword [esp + 0xc4], edi
jae 0x40317b
lea eax, [esp + 0xb0]
push 0
push 0
push eax
lea ecx, [esp + 0x5b8]
push ecx
push 0
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jl 0x40349a
mov eax, dword [esp + 0xb0]
cmp dword [esp + 0xc4], edi
jae 0x4031ae
lea eax, [esp + 0xb0]
push 0
push 0x80
push 4
push 0
push 0
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x40], esi
cmp esi, 0xffffffff
je 0x403415
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x403479
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x4c]
lea ebx, [edx + eax]
lea eax, [esp + 0x39c]
mov byte [esp + ebx + 0x4a4], 0
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403203
lea edi, [esp + 0x4a4]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403216
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x4a4]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403234
mov ecx, dword [str..tmp]
mov dl, byte [0x42c76c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x48]
mov byte [eax + 4], dl
mov eax, dword [esp + 0x1c]
push 0xa
lea edx, [esp + 0x3a0]
inc eax
push edx
push eax
mov dword [esp + 0x28], eax
mov byte [esp + ecx + 0x5b8], 0
call fcn.0041702f
lea eax, [esp + 0x3a8]
add esp, 0xc
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403280
lea edi, [esp + 0x5ac]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403293
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x39c]
rep movsb byte es:[edi], byte [esi]
mov byte [esp + ebx + 0x294], 0
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4032c0
lea edi, [esp + 0x294]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4032d3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x294]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4032f1
mov ecx, dword [str..tmp]
mov dl, byte [0x42c76c]
push 0
push 0x80
push 4
push 0
mov dword [eax], ecx
push 1
mov byte [eax + 4], dl
push 0xc0000000
lea eax, [esp + 0x4bc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40356d
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x40]
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x2000
lea edx, [esp + 0x6c0]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4033a6
push 2
push 0
push 0
push esi
call ebx
mov ecx, dword [esp + 0x20]
push 0
push ecx
push 0
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LockFile]
mov eax, dword [esp + 0x20]
push 0
lea edx, [esp + 0x54]
push edx
push eax
lea ecx, [esp + 0x6c0]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x20]
push 0
push edx
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [esp + 0x20], 0x2000
je 0x40333b
mov eax, dword [esp + 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
push esi
call edi
cmp dword [esp + 0xc4], 0x10
mov eax, dword [esp + 0xb0]
jae 0x4033d8
lea eax, [esp + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x294]
push ecx
lea edx, [esp + 0x4a8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x403415
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 0x24]
push 0
push 0
push 0x405
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x403159
lea ecx, [esp + 0xac]
call fcn.00405400
lea ecx, [esp + 0x138]
call fcn.00405400
lea ecx, [esp + 0x100]
call fcn.00405400
lea ecx, [esp + 0x11c]
call fcn.00405400
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40345c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], 0
lea ecx, [esp + 0x90]
call fcn.00405400
lea ecx, [esp + 0xc8]
call fcn.00405400
jmp 0x4036f4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xb0]
cmp dword [esp + 0xc4], edi
jae 0x403497
lea eax, [esp + 0xb0]
push eax
call ebx
lea eax, [esp + 0x100]
push eax
mov edi, str.patch.cab
lea esi, [esp + 0xe8]
call fcn.004048f0
add esp, 4
mov byte [esp + 0x26c8], 0xe
cmp dword [esp + 0xfc], 0x10
mov eax, dword [esp + 0xe8]
jae 0x4034d6
lea eax, [esp + 0xe8]
xor edi, edi
push edi
push eax
lea ecx, [esp + 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40359c
lea edx, [esp + 0x294]
push edx
call ebx
cmp dword [esp + 0xfc], 0x10
mov eax, dword [esp + 0xe8]
jae 0x403512
lea eax, [esp + 0xe8]
push eax
call ebx
lea ecx, [esp + 0xe4]
call fcn.00405400
lea ecx, [esp + 0xac]
call fcn.00405400
lea ecx, [esp + 0x138]
call fcn.00405400
lea ecx, [esp + 0x100]
call fcn.00405400
lea ecx, [esp + 0x11c]
call fcn.00405400
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x40345c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], edi
jmp 0x40345c
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0xc4], 0x10
mov eax, dword [esp + 0xb0]
jae 0x403590
lea eax, [esp + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x403415
lea eax, [esp + 0x294]
push eax
call ebx
cmp dword [esp + 0xfc], 0x10
mov eax, dword [esp + 0xe8]
jae 0x4035be
lea eax, [esp + 0xe8]
push edi
push 0x80
push 4
push edi
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x403515
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x403607
lea ecx, [esp + 0xe4]
call fcn.00405400
jmp 0x403415
cmp dword [esp + 0xfc], 0x10
mov edx, dword [esp + 0xe8]
jae 0x40361f
lea edx, [esp + 0xe8]
mov ebx, dword [esp + 0x44]
add ebx, 0x34
call fcn.00403d10
lea ecx, [esp + 0xe4]
call fcn.00405400
lea ecx, [esp + 0xac]
call fcn.00405400
lea ecx, [esp + 0x138]
call fcn.00405400
lea ecx, [esp + 0x100]
call fcn.00405400
lea ecx, [esp + 0x11c]
call fcn.00405400
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40367e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], 0
lea ecx, [esp + 0x90]
call fcn.00405400
lea ecx, [esp + 0xc8]
call fcn.00405400
mov al, 1
jmp 0x4036f6
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4036ad
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], ebx
cmp dword [esp + 0xa8], edi
jb 0x4036c6
mov ecx, dword [esp + 0x94]
push ecx
call fcn.00416928
add esp, 4
mov byte [esp + 0x94], bl
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], esi
cmp dword [esp + 0xe0], edi
jb 0x4036f4
mov edx, dword [esp + 0xcc]
push edx
call fcn.00416928
add esp, 4
xor al, al
mov ecx, dword [esp + 0x26c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x26a8]
xor ecx, esp
call fcn.00416933
mov esp, ebp
pop ebp
ret 4