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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46a71a
mov eax, dword fs:[0]
push eax
sub esp, 0x688
mov eax, dword [0x48794c]
xor eax, esp
mov dword [esp + 0x680], eax
push ebx
push esi
push edi
mov eax, dword [0x48794c]
xor eax, esp
push eax
lea eax, [esp + 0x698]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x434]
mov eax, 1
xor edx, edx
call fcn.00444c80
or dword [0x49a238], eax
or dword [0x49a23c], edx
call fcn.00406d00
mov eax, dword [esi + 0xcc]
push ecx
sub eax, 0x10
mov dword [esp + 0x2c], esp
mov edi, esp
push eax
call fcn.00402500
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004045d0
xor ebx, ebx
cmp dword [esi + 0x434], ebx
mov eax, 3
jge 0x405f39
xor eax, eax
mov dword [esi + 0x40c], eax
dec eax
cmp eax, 4
ja case.0x405f45.4
jmp dword [eax*4 + 0x406844]
mov dword [esi + 0x44c], ebx
jmp case.0x405f45.4
mov dword [esi + 0x438], 1
jmp case.0x405f45.4
mov dword [esi + 0x438], ebx
mov dword [esi + 0x44c], 1
mov eax, dword [0x499f20]
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
cmp eax, ebx
je 0x405fc0
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405fc0
mov eax, dword [esi + 0x434]
mov ecx, dword [0x499f20]
mov edx, dword [ecx + 0x20]
push eax
push 6
push 0x403
push edx
call edi
mov eax, dword [esi + 0x434]
push eax
mov eax, dword [0x499f20]
mov ecx, dword [eax + 0x20]
push 5
push 0x403
push ecx
call edi
push 0xfe
lea eax, [esp + 0x18a]
xor edx, edx
push ebx
push eax
mov word [esp + 0x190], dx
call fcn.00440cf0
add esp, 0xc
push 0x200
lea ecx, [esp + 0x288]
push ebx
push ecx
call fcn.00440cf0
add esp, 0xc
lea edx, [esp + 0x44]
push edx
call fcn.0040bcc0
mov dword [esp + 0x6a0], ebx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.0040e5e6
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x406031
push 0x80004005
call fcn.004014a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x6a0], 1
test byte [0x49a2a0], 1
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], ebx
jne 0x40608c
or dword [0x49a2a0], 1
push 0x49a280
mov byte [esp + 0x6a4], 2
call fcn.00402650
push 0x46ab50
call fcn.0043f036
add esp, 4
mov byte [esp + 0x6a0], 1
push ebx
call fcn.0043ee32
mov ecx, dword [esi + 0x20]
add esp, 4
push ebx
push 0x3e8
push 1
push ecx
mov dword [esi + 0x94], eax
mov dword [esi + 0x98], edx
mov dword [esi + 0x9c], eax
mov dword [esi + 0xa0], edx
call dword [sym.imp.USER32.dll_SetTimer]
mov edx, dword [esi + 0x20]
push ebx
push ebx
push edx
mov dword [esi + 0x58], 1
call dword [sym.imp.USER32.dll_InvalidateRect]
push 1
push 0x49a280
lea ecx, [esp + 0x40]
call fcn.0041c48a
push ecx
mov byte [esp + 0x6a4], 3
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x477f28
call fcn.00401b10
push str.FORMAT.SerialNumber
lea edi, [esp + 0x18]
call fcn.0040da70
push ebx
lea eax, [esp + 0x18]
push eax
push str.FORMAT.AutoSN
call fcn.0040dcb0
mov eax, dword [esp + 0x178]
lea ecx, [esp + 0x184]
sub ecx, eax
lea esp, [esp]
movzx edx, word [eax]
mov word [eax + ecx], dx
add eax, 2
cmp dx, bx
jne 0x406130
mov eax, dword [esp + 0x17c]
lea edx, [esp + 0x284]
sub edx, eax
nop
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
cmp cx, bx
jne 0x406150
cmp dword [esp + 0x14], ebx
jne 0x406277
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push str._llx
push edx
call fcn.0043f0bd
add esp, 0xc
call fcn.0040e5e6
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40619a
push 0x80004005
call fcn.004014a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x6a0], 4
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add ecx, 1
adc edx, ebx
push edx
push ecx
lea eax, [esp + 0x1c]
push str._016llx
push eax
call fcn.00403600
mov edi, dword [esp + 0x24]
mov ecx, dword [edi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add edi, 0xfffffff0
add esp, 0xc
mov dword [esp + 0x1c], esp
mov dword [esp + 0x1c], esp
call eax
cmp dword [edi + 0xc], ebx
lea edx, [edi + 0xc]
jl 0x406205
cmp eax, dword [edi]
jne 0x406205
mov ebx, edi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x406241
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x40621e
call fcn.004018d0
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [edi + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [ebx + 0x10]
push ecx
call fcn.0043ea20
add esp, 0x10
mov edx, dword [esp + 0x1c]
add ebx, 0x10
push str.FORMAT.SerialNumber
mov dword [edx], ebx
call fcn.0040de50
mov byte [esp + 0x6a0], 3
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40629b
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
jmp 0x40629b
mov eax, dword [esi + 0x434]
inc eax
cdq
push edx
push eax
lea ecx, [esp + 0x18]
push str._016llx
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
call fcn.00403600
add esp, 0x10
lea ecx, [esp + 0x38]
mov byte [esp + 0x6a0], 1
call fcn.0041c466
mov ebx, dword [esp + 0x10]
mov edi, 0x10
cmp dword [ebx - 0xc], edi
jge 0x4062d3
lea ebx, [ebx]
lea edx, [esp + 0x10]
push edx
call fcn.00406de0
mov ebx, dword [esp + 0x10]
cmp dword [ebx - 0xc], edi
jl 0x4062c0
mov edi, dword [ebx - 0xc]
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, edi
or eax, ecx
jge 0x4062f5
push edi
lea ecx, [esp + 0x14]
call fcn.00401920
mov ebx, dword [esp + 0x10]
lea eax, [edi + 1]
push eax
push ebx
call fcn.0043f702
add esp, 8
test edi, edi
jl 0x4065fb
cmp edi, dword [ebx - 8]
jg 0x4065fb
mov dword [ebx - 0xc], edi
xor ecx, ecx
mov word [ebx + edi*2], cx
mov eax, dword [esi + 0x434]
mov edx, dword [0x499f20]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
mov eax, dword [edx + 0x20]
push 0xa
push 0x403
push eax
call edi
lea ecx, [esp + 0x18]
push ecx
call fcn.0040b110
mov eax, dword [eax]
add esp, 4
lea edx, [esp + 0x284]
push edx
push eax
lea ecx, [esp + 0x48c]
push 0x478778
push ecx
call fcn.0043f0df
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406389
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea ecx, [esp + 0x49c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x4063f6
cmp dword [esi + 0xb0], 0
jl 0x406479
mov eax, dword [esi + 0x434]
test eax, eax
jl 0x406479
cmp dword [esi + 0x438], 0
je 0x406479
mov edx, dword [0x499f20]
push str.Invalid_Bin_File
push eax
mov eax, dword [edx + 0x20]
push 0x401
push eax
call edi
jmp 0x406479
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4064b4
cmp dword [esi + 0xb0], 0
jl 0x406441
mov eax, dword [esi + 0x434]
test eax, eax
jl 0x406441
cmp dword [esi + 0x438], 0
je 0x406441
mov ecx, dword [0x499f20]
mov edx, dword [ecx + 0x20]
push str.Invalid_Bin_File
push eax
push 0x401
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x406461
push eax
call fcn.0040e26e
add esp, 4
test ebx, ebx
je 0x40646e
push ebx
call fcn.0040e26e
add esp, 4
cmp dword [esp + 0x28], 0
je 0x406694
mov edx, dword [esi + 0x20]
mov edi, dword [sym.imp.USER32.dll_KillTimer]
xor ebx, ebx
push ebx
push edx
call edi
mov eax, dword [esi + 0x20]
push 1
push eax
call edi
cmp dword [esi + 0x434], ebx
lea eax, [ebx + 5]
jge 0x40649d
xor eax, eax
mov dword [esi + 0x40c], eax
dec eax
cmp eax, 4
ja case.0x4064ad.4
jmp dword [eax*4 + 0x406858]
push edi
call fcn.0040e263
mov edx, dword [esp + 0x18]
add esp, 4
push 0
lea ecx, [esp + 0x38]
push ecx
push edi
push eax
push edx
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x400
call fcn.0040e263
add esp, 4
push 0x400
mov ebx, eax
push 0x496cc8
push ebx
call fcn.00445ff0
add esp, 0xc
xor eax, eax
lea ecx, [ebx + 0x2b5]
nop
test eax, eax
jl 0x4065fb
mov edx, dword [esp + 0x10]
cmp eax, dword [edx - 0xc]
jg 0x4065fb
movzx edx, word [edx + eax*2]
mov byte [ecx - 1], dl
mov byte [ecx], 0
inc eax
add ecx, 2
cmp eax, 0x10
jl 0x406500
mov al, byte [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
dec al
mov byte [ebx + 0x212], al
mov edx, dword [edi + ecx - 0x10]
lea eax, [edi + ecx - 0x10]
mov dword [ebx + 0x3f0], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 0x3f4], ecx
mov edx, dword [eax + 8]
mov dword [ebx + 0x3f8], edx
mov eax, dword [eax + 0xc]
mov dword [ebx + 0x3fc], eax
cmp dword [esi + 0xb0], 0
jl 0x406598
mov eax, dword [esi + 0x434]
test eax, eax
jl 0x406598
cmp dword [esi + 0x438], 0
je 0x406598
mov ecx, dword [0x499f20]
mov edx, dword [ecx + 0x20]
push str.Updating...
push eax
push 0x401
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0x42c]
push eax
push ecx
mov ecx, ebx
mov edx, edi
call fcn.00405520
add esp, 8
test eax, eax
jne 0x406605
cmp dword [esi + 0xb0], eax
jl 0x406445
mov eax, dword [esi + 0x434]
test eax, eax
jl 0x406445
cmp dword [esi + 0x438], 0
je 0x406445
mov edx, dword [0x499f20]
push str.Failed
push eax
mov eax, dword [edx + 0x20]
push 0x401
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x406445
push 0x80070057
call fcn.004014a0
mov dword [esp + 0x28], 0
jmp 0x406445
mov dword [esi + 0x44c], ebx
jmp case.0x4064ad.4
mov dword [esi + 0x438], 1
jmp case.0x4064ad.4
mov dword [esi + 0x438], ebx
mov dword [esi + 0x44c], 1
mov eax, dword [0x499f20]
cmp eax, ebx
je 0x4067bd
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4067bd
mov eax, dword [esi + 0x434]
mov edx, dword [0x499f20]
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
push eax
mov eax, dword [edx + 0x20]
push 6
push 0x403
push eax
call edi
mov eax, dword [esi + 0x434]
mov ecx, dword [0x499f20]
mov edx, dword [ecx + 0x20]
push eax
push 5
push 0x403
push edx
call edi
jmp 0x4067bd
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
xor ebx, ebx
cmp eax, ebx
ja 0x4066b7
jb 0x4066a9
cmp ecx, 0xffffffff
ja 0x4066b7
push eax
push ecx
push str.SN:__08llX
lea eax, [esp + 0x1c]
push eax
jmp 0x4066c3
push eax
push ecx
push str.SN:__016llX
lea ecx, [esp + 0x1c]
push ecx
call fcn.00403600
mov eax, dword [esp + 0x20]
add esp, 0x10
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x2c], esp
mov edi, esp
push eax
call fcn.00402500
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004045d0
cmp dword [esi + 0xb0], ebx
jl 0x406721
mov eax, dword [esi + 0x434]
cmp eax, ebx
jl 0x406721
cmp dword [esi + 0x438], ebx
je 0x406721
mov edx, dword [0x499f20]
push str.Successed
push eax
mov eax, dword [edx + 0x20]
push 0x401
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [esi + 0x434], ebx
mov eax, 4
jge 0x406730
xor eax, eax
mov dword [esi + 0x40c], eax
dec eax
cmp eax, 4
ja case.0x40673c.4
jmp dword [eax*4 + 0x40686c]
mov dword [esi + 0x44c], ebx
jmp case.0x40673c.4
mov dword [esi + 0x438], 1
jmp case.0x40673c.4
mov dword [esi + 0x438], ebx
mov dword [esi + 0x44c], 1
mov eax, dword [0x499f20]
cmp eax, ebx
je 0x4067b8
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4067b8
mov eax, dword [esi + 0x434]
mov edx, dword [0x499f20]
mov edi, dword [sym.imp.USER32.dll_PostMessageW]
push eax
mov eax, dword [edx + 0x20]
push 6
push 0x403
push eax
call edi
mov eax, dword [esi + 0x434]
mov ecx, dword [0x499f20]
mov edx, dword [ecx + 0x20]
push eax
push 5
push 0x403
push edx
call edi
call fcn.00406ca0
mov ecx, dword [esi + 0x434]
mov eax, 1
xor edx, edx
call fcn.00444c80
not eax
and dword [0x49a238], eax
not edx
and dword [0x49a23c], edx
mov byte [esp + 0x6a0], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406807
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x44]
mov dword [esp + 0x6a0], 0xffffffff
call fcn.0040bd70
mov eax, 1
mov ecx, dword [esp + 0x698]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x680]
xor ecx, esp
call fcn.0043ea11
mov esp, ebp
pop ebp
ret