Function at 0xb0d07c
Capabilities:
Query environment variable
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xca8
push ebx
push esi
push edi
mov dword [ebp - 0xca4], 1
push 0
push 2
push 3
push 0
push 3
push 0xc0000000
mov eax, 0xb1f010
add eax, 0x80
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc28], eax
cmp dword [ebp - 0xc28], 0xffffffff
jne 0xb0d1b9
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0xc28], eax
push 0x400
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0xc2c], 0
jmp 0xb0d0fe
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 0x400
jge 0xb0d120
mov eax, dword [ebp - 0xc2c]
movsx eax, byte [eax + ebp - 0x414]
test eax, eax
jne 0xb0d11e
jmp 0xb0d120
jmp 0xb0d0f8
jmp 0xb0d128
dec dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 0
jle 0xb0d148
mov eax, dword [ebp - 0xc2c]
movsx eax, byte [eax + ebp - 0x414]
cmp eax, 0x5c
jne 0xb0d146
jmp 0xb0d148
jmp 0xb0d122
cmp dword [ebp - 0xc2c], 0
je 0xb0d1af
mov eax, dword [ebp - 0xc2c]
mov byte [eax + ebp - 0x413], 0
mov eax, 0xb1f010
add eax, 0x80
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0xc90]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 2
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0xc90]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc28], eax
jmp 0xb0d1b9
mov dword [ebp - 0xc28], 0xffffffff
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0xb1fb54
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0xc24], 0
mov dword [ebp - 0xc2c], 0
cmp dword [ebp - 0xc28], 0xffffffff
jne 0xb0d33f
cmp dword [ebp - 0xca4], 0
jne 0xb0d201
xor eax, eax
jmp 0xb0d885
jmp 0xb0d209
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 0x400
jge 0xb0d23e
mov eax, dword [ebp - 0xc2c]
movsx eax, byte [eax + ebp - 0x414]
test eax, eax
je 0xb0d23e
mov eax, dword [ebp - 0xc2c]
movsx eax, byte [eax + ebp - 0x414]
cmp eax, 0x3b
jne 0xb0d23c
jmp 0xb0d23e
jmp 0xb0d203
mov eax, dword [ebp - 0xc2c]
movsx eax, byte [eax + ebp - 0x414]
test eax, eax
jne 0xb0d25a
mov dword [ebp - 0xca4], 0
cmp dword [ebp - 0xc2c], 0x400
jne 0xb0d26d
xor eax, eax
jmp 0xb0d885
mov eax, dword [ebp - 0xc2c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc94], 0
jmp 0xb0d288
inc dword [ebp - 0xc94]
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0xc24]
cmp eax, dword [ebp - 0xc94]
jle 0xb0d2bb
mov eax, dword [ebp - 0xc24]
add eax, dword [ebp - 0xc94]
mov al, byte [eax + ebp - 0x414]
mov ecx, dword [ebp - 0xc94]
mov byte [ecx + ebp - 0xc90], al
jmp 0xb0d282
mov eax, dword [ebp - 0xc94]
movsx eax, byte [eax + ebp - 0xc91]
cmp eax, 0x5c
je 0xb0d2e2
mov eax, dword [ebp - 0xc94]
mov byte [eax + ebp - 0xc90], 0x5c
inc dword [ebp - 0xc94]
mov eax, dword [ebp - 0xc94]
mov byte [eax + ebp - 0xc90], 0
mov eax, 0xb1f010
add eax, 0x80
push eax
lea eax, [ebp - 0xc90]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 2
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0xc90]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc28], eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0xc24], eax
inc dword [ebp - 0xc2c]
jmp 0xb0d1e4
push 0
lea eax, [ebp - 0xc9c]
push eax
push 4
lea eax, [ebp - 0xc20]
push eax
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0xb1f2c6]
mov dword [ebp - 0xc98], eax
mov eax, dword [0xb1f08c]
mov dword [0xb1f2c6], eax
mov dword [ebp - 0xc2c], 0
cmp dword [ebp - 0xc2c], 4
jge 0xb0d3f9
call fcn.00b0eab9
movzx eax, ax
cdq
xor eax, edx
sub eax, edx
and eax, 3
xor eax, edx
sub eax, edx
mov byte [ebp - 8], al
mov dword [ebp - 0xc94], 0
jmp 0xb0d3af
inc dword [ebp - 0xc94]
mov eax, dword [ebp - 0xc94]
cmp dword [ebp - 0xc2c], eax
jle 0xb0d3d6
mov eax, dword [ebp - 0xc94]
xor ecx, ecx
mov cl, byte [eax + ebp - 0xc]
xor eax, eax
mov al, byte [ebp - 8]
cmp ecx, eax
jne 0xb0d3d4
jmp 0xb0d3d6
jmp 0xb0d3a9
mov eax, dword [ebp - 0xc94]
cmp dword [ebp - 0xc2c], eax
jne 0xb0d3f7
mov al, byte [ebp - 8]
mov ecx, dword [ebp - 0xc2c]
mov byte [ecx + ebp - 0xc], al
inc dword [ebp - 0xc2c]
jmp 0xb0d37d
mov al, byte [ebp - 0xb]
xor ecx, ecx
mov cl, byte [ebp - 0xc]
mov byte [ecx + ebp - 4], al
mov al, byte [ebp - 0xa]
xor ecx, ecx
mov cl, byte [ebp - 0xb]
mov byte [ecx + ebp - 4], al
mov al, byte [ebp - 9]
xor ecx, ecx
mov cl, byte [ebp - 0xa]
mov byte [ecx + ebp - 4], al
mov al, byte [ebp - 0xc]
xor ecx, ecx
mov cl, byte [ebp - 9]
mov byte [ecx + ebp - 4], al
mov dword [ebp - 0xc2c], 0
jmp 0xb0d43b
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 4
jge 0xb0d45c
mov al, byte [ebp - 0xc2c]
mov ecx, dword [ebp - 0xc2c]
xor edx, edx
mov dl, byte [ecx + ebp - 4]
mov byte [edx + ebp - 0x10], al
jmp 0xb0d435
mov dword [ebp - 0xca8], 0
jmp 0xb0d46e
inc dword [ebp - 0xca8]
cmp dword [ebp - 0xca8], 4
jge 0xb0d57a
mov dword [ebp - 0xc2c], 0
cmp dword [ebp - 0xc2c], 0x100
jge 0xb0d525
call fcn.00b0eab9
movzx eax, ax
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [ebp - 8], al
mov dword [ebp - 0xc94], 0
jmp 0xb0d4c0
inc dword [ebp - 0xc94]
mov eax, dword [ebp - 0xc94]
cmp dword [ebp - 0xc2c], eax
jle 0xb0d4f3
mov eax, dword [ebp - 0xca8]
shl eax, 8
add eax, dword [ebp - 0xc94]
xor ecx, ecx
mov cl, byte [eax + ebp - 0xc14]
xor eax, eax
mov al, byte [ebp - 8]
cmp ecx, eax
jne 0xb0d4f1
jmp 0xb0d4f3
jmp 0xb0d4ba
mov eax, dword [ebp - 0xc94]
cmp dword [ebp - 0xc2c], eax
jne 0xb0d520
mov al, byte [ebp - 8]
mov ecx, dword [ebp - 0xca8]
shl ecx, 8
add ecx, dword [ebp - 0xc2c]
mov byte [ecx + ebp - 0xc14], al
inc dword [ebp - 0xc2c]
jmp 0xb0d485
mov dword [ebp - 0xc2c], 0
jmp 0xb0d537
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 0x100
jge 0xb0d575
mov al, byte [ebp - 0xc2c]
mov ecx, dword [ebp - 0xca8]
shl ecx, 8
add ecx, dword [ebp - 0xc2c]
xor edx, edx
mov dl, byte [ecx + ebp - 0xc14]
mov ecx, dword [ebp - 0xca8]
shl ecx, 8
add edx, ecx
mov byte [edx + ebp - 0x814], al
jmp 0xb0d531
jmp 0xb0d468
push 0
push 0
push 0x10
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0xc9c]
push eax
push 4
lea eax, [ebp - 0xca0]
push eax
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc20]
xor dword [ebp - 0xca0], eax
lea eax, [ebp - 0xca0]
mov dword [ebp - 0xc18], eax
mov dword [ebp - 0xca8], 0
jmp 0xb0d5d6
inc dword [ebp - 0xca8]
cmp dword [ebp - 0xca8], 2
jge 0xb0d6a9
mov dword [ebp - 0xc2c], 0
jmp 0xb0d5f5
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 4
jge 0xb0d632
mov eax, dword [ebp - 0xc2c]
mov ecx, dword [ebp - 0xc18]
xor edx, edx
mov dl, byte [ecx + eax]
mov eax, dword [ebp - 0xc2c]
shl eax, 8
add edx, eax
mov al, byte [edx + ebp - 0x814]
mov ecx, dword [ebp - 0xc2c]
mov edx, dword [ebp - 0xc18]
mov byte [edx + ecx], al
jmp 0xb0d5ef
mov dword [ebp - 0xc2c], 0
jmp 0xb0d644
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 4
jge 0xb0d66e
mov eax, dword [ebp - 0xc2c]
mov ecx, dword [ebp - 0xc18]
mov al, byte [ecx + eax]
mov ecx, dword [ebp - 0xc2c]
xor edx, edx
mov dl, byte [ecx + ebp - 0x10]
mov byte [edx + ebp - 0xc], al
jmp 0xb0d63e
mov dword [ebp - 0xc2c], 0
jmp 0xb0d680
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 4
jge 0xb0d6a4
mov eax, dword [ebp - 0xc2c]
mov al, byte [eax + ebp - 0xc]
mov ecx, dword [ebp - 0xc2c]
mov edx, dword [ebp - 0xc18]
mov byte [edx + ecx], al
jmp 0xb0d67a
jmp 0xb0d5d0
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00b0cfe4
add esp, 0x10
mov dword [ebp - 0xc1c], eax
mov eax, dword [ebp - 0xca0]
cmp dword [ebp - 0xc1c], eax
jae 0xb0d6e9
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0xb0d885
lea eax, [ebp - 0xc1c]
mov dword [ebp - 0xc18], eax
mov dword [ebp - 0xca8], 0
jmp 0xb0d707
inc dword [ebp - 0xca8]
cmp dword [ebp - 0xca8], 2
jge 0xb0d7bd
mov dword [ebp - 0xc2c], 0
jmp 0xb0d726
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 4
jge 0xb0d750
mov eax, dword [ebp - 0xc2c]
mov ecx, dword [ebp - 0xc18]
mov al, byte [ecx + eax]
mov ecx, dword [ebp - 0xc2c]
xor edx, edx
mov dl, byte [ecx + ebp - 4]
mov byte [edx + ebp - 0xc], al
jmp 0xb0d720
mov dword [ebp - 0xc2c], 0
jmp 0xb0d762
inc dword [ebp - 0xc2c]
cmp dword [ebp - 0xc2c], 4
jge 0xb0d7b8
mov eax, dword [ebp - 0xc2c]
mov al, byte [eax + ebp - 0xc]
mov ecx, dword [ebp - 0xc2c]
mov edx, dword [ebp - 0xc18]
mov byte [edx + ecx], al
mov eax, dword [ebp - 0xc2c]
mov ecx, dword [ebp - 0xc18]
xor edx, edx
mov dl, byte [ecx + eax]
mov eax, dword [ebp - 0xc2c]
shl eax, 8
add edx, eax
mov al, byte [edx + ebp - 0xc14]
mov ecx, dword [ebp - 0xc2c]
mov edx, dword [ebp - 0xc18]
mov byte [edx + ecx], al
jmp 0xb0d75c
jmp 0xb0d701
mov eax, dword [ebp - 0xc1c]
mov dword [0xb1f2c6], eax
push 0
push 0
push 0
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0xca8], 0
jmp 0xb0d7ed
inc dword [ebp - 0xca8]
cmp dword [ebp - 0xca8], 0x14
jge 0xb0d866
cmp dword [ebp - 0xca8], 0x10
jge 0xb0d835
call fcn.00b0eab9
mov byte [ebp - 8], al
cmp dword [ebp - 0xca8], 4
jge 0xb0d833
mov eax, dword [ebp - 0xca8]
mov ecx, dword [ebp - 0xc18]
xor edx, edx
mov dl, byte [ecx + eax]
xor dl, byte [ebp - 8]
mov eax, dword [ebp - 0xca8]
mov ecx, dword [ebp - 0xc18]
mov byte [ecx + eax], dl
jmp 0xb0d848
mov eax, dword [ebp - 0xca8]
mov ecx, dword [ebp - 0xc18]
mov al, byte [ecx + eax - 0x10]
mov byte [ebp - 8], al
push 0
lea eax, [ebp - 0xc9c]
push eax
push 1
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0xb0d7e7
mov eax, dword [ebp - 0xc98]
mov dword [0xb1f2c6], eax
mov eax, dword [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0xb0d885
pop edi
pop esi
pop ebx
leave
ret