Function at 0x402000
Capabilities:
Get common file path
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x19824
call fcn.004110b0
mov eax, dword [0x43ec10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0
mov dword [esp + 0x19830], eax
mov dword [esp + 0x18], ecx
push 0
mov byte [esp + 0x1190], 0
xor eax, eax
mov ecx, 0x61a7
lea edi, [esp + 0x1191]
rep stosd dword es:[edi], eax
push 3
push 0
push 0
stosw word es:[edi], ax
push SysReAllocString
push ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402757
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push esi
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x402757
push 0
push 0
push 3
push 0
push 3
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402757
lea ecx, [edi + 1]
push ecx
call fcn.004219de
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x1c], ebx
je 0x402757
mov ecx, dword [esp + 0x14]
push edi
push ebx
push esi
call fcn.00401140
test eax, eax
je 0x402757
push esi
mov byte [edi + ebx], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0xf78]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x104
lea eax, [esp + 0xe74]
push eax
push 0
mov dword [esp + 0x30], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0xe70]
push 0x5c
push ecx
call fcn.00411630
add esp, 8
inc eax
lea ecx, [esp + 0xd68]
sub ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
mov byte [ecx + eax], dl
inc eax
test dl, dl
jne 0x402130
xor esi, esi
mov eax, str._IMG
mov dword [esp + 0x18], esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402148
sub eax, edx
sub edi, eax
je 0x40270b
lea esp, [esp]
xor eax, eax
mov byte [esp + 0x240], 0
mov ecx, 0xff
lea edi, [esp + 0x241]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, str._IMG
mov byte [esp + 0xf], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402188
sub eax, edx
push eax
add esi, ebx
push str._IMG
push esi
call fcn.0041e89e
add esp, 0xc
test eax, eax
jne 0x40267e
push 0x430834
push esi
call fcn.00411020
mov edi, eax
add esp, 8
test edi, edi
je 0x402757
push 3
push 0x430830
push esi
call fcn.0041e89e
add esp, 0xc
test eax, eax
je 0x402237
cmp esi, edi
je 0x4026d8
inc byte [esp + 0xf]
lea eax, [esp + 0x240]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4021f0
sub eax, edx
mov byte [esp + eax + 0x241], cl
lea eax, [esp + 0x240]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402210
sub eax, edx
mov dl, byte [esi]
push 3
inc esi
push 0x430830
push esi
mov byte [esp + eax + 0x24c], dl
call fcn.0041e89e
add esp, 0xc
test eax, eax
jne 0x4021d6
cmp esi, edi
je 0x4026d8
mov cl, byte [esp + 0xf]
add cl, 3
lea edi, [esp + 0x240]
mov byte [esp + 0xf], cl
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402252
mov eax, dword [0x43082c]
mov dword [edi], eax
add esi, 3
mov bl, byte [esi]
cmp bl, 0x20
je 0x402275
cmp bl, 0x3d
je 0x402275
cmp bl, 9
jne 0x4022b3
inc byte [esp + 0xf]
lea eax, [esp + 0x240]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402283
sub eax, edx
mov byte [esp + eax + 0x241], cl
lea eax, [esp + 0x240]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4022a0
sub eax, edx
mov byte [esp + eax + 0x240], bl
inc esi
jmp 0x402264
lea edi, [esp + 0x240]
dec edi
jmp 0x4022c0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4022c0
mov cx, word [0x430828]
mov word [edi], cx
mov cl, byte [esi]
cmp cl, 0x22
mov ebx, esi
je 0x402305
cmp cl, 0x20
mov eax, esi
je 0x40232c
cmp cl, 0x22
je 0x40232c
cmp cl, 0x3e
je 0x40232c
cmp cl, 9
je 0x40232c
mov cl, byte [esp + 0xf]
inc cl
inc eax
mov byte [esp + 0xf], cl
mov cl, byte [eax]
cmp cl, 0x20
jne 0x4022e2
jmp 0x40232c
lea ebx, [esi + 1]
push 0x22
push ebx
call fcn.00411400
add esp, 8
test eax, eax
je 0x4026d8
mov cl, byte [esp + 0xf]
mov dl, al
sub dl, bl
add dl, 2
add cl, dl
mov byte [esp + 0xf], cl
mov esi, eax
sub esi, ebx
push esi
lea eax, [esp + 0x13c]
push ebx
push eax
call fcn.00411500
lea ecx, [esp + 0xd74]
push ecx
mov byte [esp + esi + 0x148], 0
mov esi, dword [esp + 0x34]
push esi
lea edx, [esp + 0x864]
push str._d__s
push edx
call fcn.004112dd
inc esi
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x30]
lea eax, [esp + 0x86c]
push eax
lea ecx, [esi + 0x538]
push ecx
lea edx, [esp + 0xf9c]
push edx
lea eax, [esp + 0x770]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x30
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x138]
mov byte [esp + eax + 0x958], cl
inc eax
test cl, cl
jne 0x4023a0
mov byte [esp + 0x95c], cl
mov bl, byte [ebx]
cmp bl, 0x5c
je 0x4024ae
cmp bl, 0x2f
je 0x4024ae
lea ecx, [esp + 0x958]
push str.HTTP
push ecx
call fcn.0041e835
add esp, 8
test eax, eax
jne 0x4023f5
lea eax, [esp + 0x138]
mov ecx, esi
jmp 0x402506
mov eax, dword [ebp + 0xc]
lea edx, [esp + 0x640]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402401
push 7
lea ebx, [esp + 0x644]
mov ecx, ebx
push str.http:__
push ecx
call fcn.004114c0
add esp, 0xc
test eax, eax
jne 0x40242f
lea ebx, [esp + 0x647]
push 0x2f
push ebx
call fcn.00411630
add esp, 8
test eax, eax
je 0x40244f
push 0x2f
push ebx
call fcn.00411630
add esp, 8
mov byte [eax + 1], 0
jmp 0x402464
mov edi, ebx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402452
mov dx, word [0x43080c]
mov word [edi], dx
lea eax, [esp + 0x138]
mov edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402470
sub eax, edx
dec ebx
mov edi, ebx
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402480
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 + 0x748]
lea ecx, [esp + 0x640]
push eax
push ecx
mov ecx, dword [esp + 0x1c]
jmp 0x40250f
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x1080]
push edx
lea eax, [esp + 0xa64]
push eax
push ecx
mov ecx, esi
call fcn.00401d10
lea eax, [esp + 0x138]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4024d2
lea edi, [esp + 0xa60]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4024e3
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]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0xa60]
lea edx, [esp + 0x748]
push edx
push eax
call fcn.00401ef0
mov esi, dword [esp + 0x14]
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0xb68]
rep stosd dword es:[edi], eax
lea eax, [esi + 0x330]
mov dword [esp + 0x28], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402535
sub eax, edx
mov dword [esp + 0x20], eax
je 0x4025bb
mov ebx, dword [esp + 0x28]
mov eax, 0xfffffcd0
sub eax, esi
mov dword [esp + 0x20], eax
mov dl, byte [ebx]
cmp dl, 0x5c
jne 0x40257f
lea edi, [esp + 0xb68]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402562
mov cx, word [0x430808]
mov dl, byte [0x43080a]
mov word [edi], cx
mov byte [edi + 2], dl
jmp 0x4025a0
lea eax, [esp + 0xb68]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402590
sub eax, esi
mov byte [esp + eax + 0xb68], dl
mov eax, dword [esp + 0x28]
inc ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4025a8
mov ecx, dword [esp + 0x20]
sub eax, edx
add ecx, ebx
cmp ecx, eax
jb 0x402553
lea eax, [esp + 0xb68]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4025c4
lea edi, [esp + 0x240]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4025d5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x240]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4025f7
sub eax, edx
cmp byte [esp + eax + 0x23f], 0x5c
je 0x40262c
lea edi, [esp + 0x240]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402612
mov dx, word [0x430808]
mov al, byte [0x43080a]
mov word [edi], dx
mov byte [edi + 2], al
lea eax, [esp + 0x850]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402635
lea edi, [esp + 0x240]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402646
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 edi, [esp + 0x240]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402666
mov cx, word [0x430828]
mov bl, byte [esp + 0xf]
mov word [edi], cx
jmp 0x402691
mov dl, byte [esi]
mov byte [esp + 0x241], 0
mov byte [esp + 0x240], dl
mov bl, 1
lea eax, [esp + 0x240]
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026a0
lea edi, [esp + 0x1188]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4026b1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
movsx eax, bl
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
lea edx, [ecx + eax - 1]
mov dword [esp + 0x18], edx
mov esi, dword [esp + 0x18]
inc esi
mov eax, str._IMG
mov dword [esp + 0x18], esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026f0
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x1c]
sub eax, edx
sub ecx, eax
cmp esi, ecx
jb 0x402160
lea eax, [esi + ebx]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402710
lea edi, [esp + 0x1188]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402721
mov edx, dword [ebp + 8]
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0
push 2
push 0
push 3
mov ecx, eax
push 0x40000000
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40276f
or eax, 0xffffffff
mov ecx, dword [esp + 0x1982c]
call fcn.00410a9d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, 8
mov esi, str._base_target__new__href_http:__
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x38
lea edi, [esp + 0x52]
rep stosd dword es:[edi], eax
push 7
stosw word es:[edi], ax
mov eax, dword [ebp + 0xc]
push str.http:__
push eax
mov dword [esp + 0x1c], 0
call fcn.0041e89e
add esp, 0xc
test eax, eax
mov eax, dword [ebp + 0xc]
jne 0x4027cf
add eax, 7
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4027b7
lea edi, [esp + 0x30]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4027c5
jmp 0x4027e8
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4027d1
lea edi, [esp + 0x30]
sub eax, edx
dec edi
nop
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4027e0
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 ecx, [esp + 0x51]
push 0x2f
push ecx
call fcn.00411630
add esp, 8
test eax, eax
je 0x40281e
lea edx, [esp + 0x51]
push 0x2f
push edx
call fcn.00411630
add esp, 8
mov byte [eax + 1], 0
lea edi, [esp + 0x30]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402823
mov ax, word [0x4307e0]
mov cl, byte [0x4307e2]
lea edx, [esp + 0x1188]
mov word [edi], ax
push str._head_
push edx
mov byte [edi + 2], cl
call fcn.00411020
mov esi, eax
add esp, 8
test esi, esi
jne 0x4029c9
lea eax, [esp + 0x1188]
push str._HEAD_
push eax
call fcn.00411020
mov esi, eax
add esp, 8
test esi, esi
jne 0x4029c9
lea ecx, [esp + 0x1188]
push str._html_
push ecx
call fcn.00411020
mov edi, eax
add esp, 8
test edi, edi
jne 0x402942
lea edx, [esp + 0x1188]
push str._HTML_
push edx
call fcn.00411020
mov edi, eax
add esp, 8
test edi, edi
jne 0x402942
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
lea eax, [esp + 0x14]
push eax
push 0xc
push str._html__head_
push ebx
call esi
lea eax, [esp + 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4028d6
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x3c]
push edx
push ebx
call esi
push 0
lea eax, [esp + 0x14]
push eax
push 7
push str.__head_
push ebx
call esi
lea eax, [esp + 0x1188]
lea edi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402910
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, edi
push eax
lea edx, [esp + 0x1194]
push edx
push ebx
call esi
push 0
lea eax, [esp + 0x14]
push eax
push 7
push str.__html_
push ebx
call esi
jmp 0x402a28
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x118c]
mov edx, edi
lea ecx, [esp + 0x14]
push ecx
sub edx, eax
add edx, 6
push edx
mov ecx, eax
push ecx
push ebx
call esi
push 0
lea edx, [esp + 0x14]
push edx
push 6
push str._head_
push ebx
call esi
lea eax, [esp + 0x30]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402980
push 0
sub eax, ecx
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push ebx
call esi
add edi, 6
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4029a1
push 0
sub eax, ecx
lea ecx, [esp + 0x14]
push ecx
push eax
push edi
push ebx
call esi
push 0
lea edx, [esp + 0x14]
push edx
push 7
push str.__head_
push ebx
call esi
jmp 0x402a28
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x118c]
mov ecx, esi
lea eax, [esp + 0x14]
push eax
sub ecx, edx
add ecx, 6
push ecx
mov eax, edx
push eax
push ebx
call edi
lea eax, [esp + 0x30]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4029f2
push 0
sub eax, ecx
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push ebx
call edi
add esi, 6
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402a13
push 0
sub eax, ecx
lea ecx, [esp + 0x14]
push ecx
push eax
push esi
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x1c]
push edx
call fcn.004219e3
mov ecx, dword [esp + 0x19830]
add esp, 4
mov eax, 1
call fcn.00410a9d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8